Algorithms and framework for Nonnegative Matrix Factorization