zdebruine / RcppML

Rcpp Machine Learning: Fast robust NMF, divisive clustering, and more
GNU General Public License v2.0
89 stars 15 forks source link

Different cost functions #48

Closed teng-gao closed 9 months ago

teng-gao commented 9 months ago

Hi!

Is it possible to set a different cost function instead of Frobenius norm?

For example, a Poisson cost or KL: https://pubmed.ncbi.nlm.nih.gov/15016911/

zdebruine commented 9 months ago

This is something we've thought about but not done. We definitely thought about KL, and I do have some scratch code on that, but it was 30x slower and really didn't do as well for any of our work, so it never made it into the main repo. You may wish to rig up NMF in keras if you want to do different cost functions.

teng-gao commented 9 months ago

Gotcha, thanks for the quick answer!