An Alternating Direction Algorithm for Nonnegative Matrix Factorization