madeleineudell / LowRankModels.jl

LowRankModels.jl is a julia package for modeling and fitting generalized low rank models.
Other
190 stars 65 forks source link

Non-negative Matrix Factorization Example Fails #8

Closed ahwillia closed 9 years ago

ahwillia commented 9 years ago
using LowRankModels
A,X,Y,ch = fit_nnmf(100,50,2)

Produces the following error for me:

ERROR: `similar` has no method matching similar(::StridedView{Float64,2,0,Array{Float64,2}}, ::Type{Bool}, ::(Int64,Int64))
 in similar at abstractarray.jl:116
 in map at abstractarray.jl:1329
 in evaluate at /home/alex/.julia/v0.3/LowRankModels/src/loss_and_reg.jl:217
 in objective at /home/alex/.julia/v0.3/LowRankModels/src/glrm.jl:49
 in objective at /home/alex/.julia/v0.3/LowRankModels/src/glrm.jl:37
 in objective at /home/alex/.julia/v0.3/LowRankModels/src/glrm.jl:57
 in fit! at /home/alex/.julia/v0.3/LowRankModels/src/glrm.jl:108
 in fit_nnmf at none:7

The other examples in simple_glrms.jl seem to work for me though.

ahwillia commented 9 years ago

I think the issue is that map() isn't compatible with ArrayView. I'll look into a way of circumventing this...

madeleineudell commented 9 years ago

Interesting! Let me know what you find.

On Fri, May 29, 2015 at 12:12 PM, Alex Williams notifications@github.com wrote:

I think the issue is that map() isn't compatible with ArrayView http://stackoverflow.com/questions/30537164/using-map-on-an-arrayview-in-julia. I'll look into a way of circumventing this...

— Reply to this email directly or view it on GitHub https://github.com/madeleineudell/LowRankModels.jl/issues/8#issuecomment-106906085 .

Madeleine Udell PhD Candidate in Computational and Mathematical Engineering Stanford University www.stanford.edu/~udell

ahwillia commented 9 years ago

Yep, there was a problem with ArrayViews that was screwing things up. I fixed it with a minor change to their similar() method, and NNMF works fine now on my machine. Everything should run smoothly once the pull request goes through: https://github.com/JuliaLang/ArrayViews.jl/pull/27