JuliaStats / NMF.jl

A Julia package for non-negative matrix factorization
Other
91 stars 34 forks source link

New stop condition: use component relative change #83

Closed youdongguo closed 1 year ago

youdongguo commented 1 year ago

Previously, convergence was achieved when |W[i, j]-preW[i, j]|<=tol for all i, j.

Running NMF on 10*X (where X is the data matrix ) would increase the number of iterations compared to NMF on X. Now, ||W[:, j]-preW[:, j]||/||W[:, j]+preW[:, j]||<=tol for all j is the new convergence criterion, which is relative difference rather absolute difference and thus, it is scale invariant.

This might be a breaking change but it is unclear.

This new criterion is more similar to the the stop condition in sklearn.decomposition.NMF