JuliaStats / NMF.jl

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

Improve coordinate descent algorithm #55

Closed ghost closed 3 years ago

ghost commented 3 years ago

From Issue #43 , I found that src/coorddesc.jl had a fatal problem on memory allocation. This PR improves the problem.

julia> Random.seed!(1234);

julia> Y = rand(1000, 1000);

julia> @btime nnmf($Y, 10, init=:nndsvd, alg=:cd, maxiter=100);
  358.167 ms (33 allocations: 54.06 MiB)
codecov-io commented 3 years ago

Codecov Report

Merging #55 (e609d15) into master (150b7fe) will increase coverage by 0.66%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
+ Coverage   90.85%   91.52%   +0.66%     
==========================================
  Files          11       11              
  Lines         689      696       +7     
==========================================
+ Hits          626      637      +11     
+ Misses         63       59       -4     
Impacted Files Coverage Δ
src/coorddesc.jl 100.00% <100.00%> (+8.16%) :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 150b7fe...e609d15. Read the comment docs.