From 9c2ab6170f525b9d165bfa2d4fa0833de5de8efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Koren?= Date: Fri, 23 Oct 2020 18:41:34 +0200 Subject: [PATCH] fix #16: initialize H in nnmf (#25) Projected ALS does not need H initialized, all others do --- src/interf.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interf.jl b/src/interf.jl index e342dd4..5660814 100644 --- a/src/interf.jl +++ b/src/interf.jl @@ -11,7 +11,7 @@ function nnmf(X::AbstractMatrix{T}, k::Integer; k <= min(p, n) || throw(ArgumentError("The value of k should not exceed min(size(X)).")) # determine whether H needs to be initialized - initH = alg == :projals + initH = alg != :projals # perform initialization if init == :random