factorization for learning dictionaries