JuliaStats / NMF.jl

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

Fix replicates #49

Closed ghost closed 3 years ago

ghost commented 3 years ago

This PR fixes #48.

replicates is number of times to perform the factorization. Any algorithm chooses new random initial values for W and H at each replication, except at the first replication specified by init. Among the results of all replications, nnmf returns W and H that have the smallest objective function value. For example, the usage of replicates is as follows:

rep = NMF.nnmf(X, k, replicates=10, maxiter=5, alg=:multmse)
ret = NMF.nnmf(X, k, W0=rep.W, H0=rep.H, init=:custom)
codecov-io commented 3 years ago

Codecov Report

Merging #49 (4acf51f) into master (7b64f72) will increase coverage by 0.15%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
+ Coverage   93.10%   93.26%   +0.15%     
==========================================
  Files          10       10              
  Lines         595      609      +14     
==========================================
+ Hits          554      568      +14     
  Misses         41       41              
Impacted Files Coverage Δ
src/interf.jl 95.83% <100.00%> (+1.71%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7b64f72...4acf51f. Read the comment docs.

ghost commented 3 years ago

I added the note.