-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:multmse fails; returns zeros all the time #16
Comments
Perhaps related to #15... |
Interestingly it looks like you're executing the code that we have in the test directory, so in theory that should be an active test, but it's not actually using |
I agree; the testing of this module (NMF) is not acceptable. -monty On Sun, Oct 9, 2016 at 11:59 AM, Alex Arslan notifications@github.com
|
Is there any response to the behavior here or in issue #15? Is this package actively maintained? |
I'm not sure yet what the cause is and I haven't had much time to look into it. I'll investigate it more soon and see if I can figure out what's going on. |
... it only seems to happen when using the nnmf "interface" For instance using NMF
function test_interface()
srand(5678)
p = 5
n = 8
k = 3
T = Float64
Wg = max(rand(T, p, k) .- 0.3, 0)
Hg = max(rand(T, k, n) .- 0.3, 0)
X = Wg * Hg
res = NMF.nnmf(X, k; init=:nndsvdar, alg=:multdiv)
println(res)
end
function test_explicit()
srand(5678)
p = 5
n = 8
k = 3
T = Float64
Wg = max(rand(T, p, k) .- 0.3, 0)
Hg = max(rand(T, k, n) .- 0.3, 0)
X = Wg * Hg
W, H = NMF.nndsvd(X, k; variant= :ar)
# optimize
alginst = NMF.MultUpdate{Float64}(obj=:div, maxiter=100, verbose=false)
res = NMF.solve!(alginst, X, W, H)
println(res)
end
println("------Test Interface----------")
test_interface()
println("------Test Explicit----------")
test_explicit() Gives me
|
I found the reason for the discrepancy. In the interface, for all algorithms other than |
I think I found the bug!. The README says
But in the code interf.jl - line 14
That does exactly the opposite - it's setting H to zero for all other algorithms, when it should only be doing it for ALS! @lindahua I think you wrote the higher level interface. Could this all make sense? |
this is still not fixed. Maybe we should do a pull request. Or give up. |
Sorry, this package is not really under active maintenance these days. I looked into this a while back but wasn't able to figure it out, then got busy with other things. If you know of a fix, a PR would be more than welcome! |
I can try to work a pull request in the next few days - I think the fix is simple, the problem is the package doesn't have testing that I could immediately have used to make sure changes were okay. I'll try to write some basic tests .... |
My solution in the mean time was to skip the global interface, as the algorithm specific interface seems to give sensible results for a simple exploration I did http://nbviewer.jupyter.org/github/bcbi/julia_tutorials/blob/biol1555_spring17/nnmf/nnmf_classic3_clustering.ipynb |
Sounds good; BTW, the performance of the algorithm is very good in general. |
Projected ALS does not need H initialized, all others do
The text was updated successfully, but these errors were encountered: