0
$\begingroup$

As I understand, in NMF we should have our three matrices elements non-negative. But I can't understand how to do it so far. Shouldn't we just initialize our factor matrices at the start with random positive elements?

(And I assume it's false, because we can still get our values negative) Or should we somehow penalize values if they turn negative during the minimization procedure? And if it's so, than how could i make it?

$\endgroup$
3
  • $\begingroup$ Are you asking about using the existing algorithm for NMF or about developing your own algorithm? $\endgroup$
    – lanenok
    Commented Jun 17, 2015 at 13:12
  • $\begingroup$ @lanenok Sorry, maybe my question is unclear. I just found a nice tutorial of implementing basic MF algorithm here. And at the end of the article author mentioned, that there is another one similar approach - NMF. So after reading some information about NMF it is still unclear for me how to implement it, or how to modify the code from that article. Maybe i just need to initialize all matrices with positive numbers, or maybe i should do something else. $\endgroup$
    – luckyfish
    Commented Jun 17, 2015 at 13:39
  • $\begingroup$ Why don't you just have a look at the existing implementation? For python, for example, there is an implementation in scikit-learn package. At this page you will see references to the published papers. If you click "source" link (close to the top of the page, right) you will get to the github repository page, where you can see the actual code. $\endgroup$
    – lanenok
    Commented Jun 17, 2015 at 13:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.