First step of NMF algorithm