Giter Club home page Giter Club logo

iht.jl's People

Contributors

biona001 avatar klkeys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

gdmosher

iht.jl's Issues

Roadmap for future development

IHT.jl implements iterative hard thresholding in a (decently) efficient manner. It provides crossvalidation routines to select the best sparsity level among a vector of possible levels. Finally, it interfaces with PLINK.jl to enable GWAS analysis.

Nonetheless, the facilities in IHT.jl are still somewhat limited and ripe for improvements and extensions. Among the proposed improvements are:

  • fix the logistic regression code, which currently suffers from multiple instabilities. References for logistic regression with IHT are BRB13 and YLZ13.
  • extend IHT to other nonlinear settings, if possible
  • carefullly analyze the allocations of CPU/GPU resources when using PLINK.jl. The GPU code for GWAs analysis mysteriously collapses whenever two GPUs are used.

Bounds error with L0_log

I have a dataset with 519 individuals and 10,000 SNPs.
I get a BoundsError when I try to run L0_log with k >= 3:

using DataFrames, IHT
dat = readtable("test.txt", header=true)
y = convert(Array{Float64,1},dat[:,1]) ##1st column: response
X = convert(Array{Float64,2},dat[:,2:end]) ##10,000 SNPs
output1 = @time L0_log(X, y, 1)
#0.004151 seconds (389 allocations: 1.165 MiB)
#IHT results:

#Compute time (sec):   0.0041
#Final loss:           0.6860874
#Iterations:           4
#IHT estimated 1 nonzero coefficients.
#1×2 DataFrames.DataFrame
#│ Row │ Predictor │ Estimated_β │
#├─────┼───────────┼─────────────┤
#│ 1   │ 8550      │ 0.331812    │
output2 = @time L0_log(X, y, 2)
#0.006286 seconds (445 allocations: 1.176 MiB)
#IHT results:

#Compute time (sec):   0.0062
#Final loss:           0.6840915
#Iterations:           4
#IHT estimated 2 nonzero coefficients.
#2×2 DataFrames.DataFrame
#│ Row │ Predictor │ Estimated_β │
#├─────┼───────────┼─────────────┤
#│ 1   │ 4307      │ 0.193256    │
#│ 2   │ 8550      │ 0.194642    │
output3 = @time L0_log(X, y, 3)
#ERROR: BoundsError: attempt to access 519×3 Array{Float64,2} at index [Base.OneTo(519), Base.OneTo(4)]
#Stacktrace:
# [1] throw_boundserror(::Array{Float64,2}, ::Tuple{Base.OneTo{Int64},Base.OneTo{Int64}}) at ./abstractarray.jl:433
# [2] checkbounds at ./abstractarray.jl:362 [inlined]
# [3] copy!(::Array{Float64,2}, ::SubArray{Float64,2,Array{Float64,2},Tuple{Base.Slice{Base.OneTo{Int64}},Array{Int64,1}},false}) at ./multidimensional.jl:803
# [4] #L0_log#90(::IHT.IHTLogVariables{Float64,Array{Float64,1}}, ::Float64, ::Float64, ::Float64, ::Float64, ::Float64, ::Int64, ::Int64, ::Bool, ::Bool, ::IHT.#L0_log, ::Array{Float64,2}, ::Array{Float64,1}, ::Int64) at /Users/Clauberry/.julia/v0.6/IHT/src/log.jl:343
# [5] L0_log(::Array{Float64,2}, ::Array{Float64,1}, ::Int64) at /Users/Clauberry/.julia/v0.6/IHT/src/log.jl:207

I attach the test data file.
test.txt

cannot clone the package directly

The package cannot be installed with Pkg.clone("https://github.com/klkeys/IHT.jl.git") as it depends on two other packages that are not in METADATA. So, in order to install the package, one needs to do:

Pkg.clone("https://github.com/klkeys/PLINK.jl.git")
Pkg.clone("https://github.com/klkeys/RegressionTools.jl.git")
Pkg.clone("https://github.com/klkeys/IHT.jl.git")

in this order.
If you started with Pkg.clone("https://github.com/klkeys/IHT.jl.git"), you would need to remove the IHT folder in the .julia path, before trying again in the specific order above.
It would be nice to have this info in the documentation!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.