Skip to content
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

Added support for sparse data matrices. #12

Closed
wants to merge 3 commits into from

Conversation

slundberg
Copy link

@slundberg slundberg commented Jul 11, 2016

Needed when fitting to large sparse data sets. Addresses #9

@slundberg
Copy link
Author

The problems with travis seem to be an unrelated 0.6 issue. Any chance we can merge this? ...it is a pain keeping my own copy of GLMNet in sync since I need to use sparse data.

@jeffwong
Copy link

jeffwong commented Jul 5, 2017

Would love to have this functionality too. @slundberg I looked at the travis-ci log and saw this

while loading /home/travis/.julia/v0.6/GLMNet/test/runtests.jl, in expression starting on line 143
ERROR: LoadError: MethodError: convert(::Type{Array{Float64,2}}, ::GLMNet.CompressedPredictorMatrix) is ambiguous. Candidates:
  convert(::Type{T}, X::GLMNet.CompressedPredictorMatrix) where T<:Array{Float64,2} in GLMNet at /home/travis/.julia/v0.6/GLMNet/src/GLMNet.jl:80
  convert(::Type{Array{T,n}}, x::AbstractArray{S,n}) where {T, n, S} in Base at array.jl:328
Possible fix, define
  convert(::Type{Array{Float64,2}}, ::GLMNet.CompressedPredictorMatrix)

Does this mean anything to you?

@jeffwong
Copy link

jeffwong commented Jul 5, 2017

I'm still new to Julia and don't know what happened between v 0.5 and v 0.6, though through some digging I believe the issue is in this test:

https://github.com/simonster/GLMNet.jl/blob/master/test/runtests.jl#L121

At this point path.betas is a GLMNet.CompressedPredictorMatrix. I think the fix for travis might be a one line change here

https://github.com/simonster/GLMNet.jl/blob/master/src/GLMNet.jl#L79

Does the function signature just need to change from

X::CompressedPredictorMatrix

to

X::GLMNet.CompressedPredictorMatrix

@slundberg
Copy link
Author

slundberg commented Jul 5, 2017 via email

@jeffwong
Copy link

jeffwong commented Jul 5, 2017

Congratulations! Maybe @simonster can help me to verify the issue and then it can get merged?

@jeffwong
Copy link

bump. @simonster would you be able to take a look? Thanks!

@ararslan
Copy link
Member

ararslan commented Oct 1, 2017

I'm going to close and reopen this so that (hopefully) the Travis status hook will update to point to JuliaStats instead of Simon's account. That will make it a bit easier to look at the failures in depth.

@ararslan ararslan closed this Oct 1, 2017
@ararslan ararslan reopened this Oct 1, 2017
@ararslan
Copy link
Member

ararslan commented Oct 2, 2017

The issue causing the failure has been fixed. This PR now just needs some syntactic updates for deprecated syntax and it should be good to go. I can push some commits to this branch soon to fix it up if you're still busy, @slundberg.

@slundberg
Copy link
Author

@ararslan That would be great. Thanks!

@ararslan
Copy link
Member

ararslan commented Oct 3, 2017

Continued in #25 with Scott's authorship preserved.

@ararslan ararslan closed this Oct 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants