Comments (9)
Thanks for the great package!
Would it be possible to change 'CompressedPredictorMatrix' to a mutable struct? This would allow modifying the predicted values and implementing the relaxed lasso.
from glmnet.jl.
I had a quick look through how this is implemented in the R package, and it looks like the logic for the relaxed option sits in the R code, rather than in the core fortran library. So unfortunately it looks like we can't simply access the relaxed option from the core compiled library, instead this R logic would need to be duplicated into the Julia package which is a bigger undertaking.
from glmnet.jl.
I see, That means itβs likely to be faster in the julia version
from glmnet.jl.
I think that should be fine, although it might be better to update the code to use a generic sparse matrix instead rather than the custom struct. I'm not too familiar with the internals of the package but it feels like that should be possible?
from glmnet.jl.
Yes, a sparse matrix might be better to save the parameters. Regarding the struct, I think line 90 should be changed to a mutable struct: https://github.com/JuliaStats/GLMNet.jl/blob/master/src/GLMNet.jl
Or is there any other possibility to change and save the values? I want to modify the parameters and then use them with GLMNet.predict()
from glmnet.jl.
Or is there any other possibility to change and save the values?
You may be able to use Setfield.jl or Accessors.jl to easily update the GLMNetPath
with new coefficients, something like
new_path = @set path.betas = new_betas
from glmnet.jl.
Nice, thanks for the tip!
from glmnet.jl.
@AdaemmerP did you have any luck implementing the relaxed Lasso?
from glmnet.jl.
@azev77 Yes, I was able to implement but within a time series framework (https://github.com/AdaemmerP/DetectSparsity/blob/main/CaseStudies/Functions.jl, lines 337 - 501). I also used the Lasso.jl package for it.
from glmnet.jl.
Related Issues (20)
- How to use Multinomial family HOT 4
- Error tagging new release HOT 4
- Constraints dimensions on README HOT 1
- Package compatibility caps
- get coef(cvfit, s = "lambda.min") HOT 6
- how to specify family HOT 1
- Incorrect `null_dev`s
- Feature Request: Loglikelihood function
- Register a DOI for citation purposes?
- Update glmnet source HOT 5
- Warm starts HOT 1
- TagBot trigger issue HOT 7
- MethodError: glmnet(::Array{Float64,2}, ::Array{Int64,1}) is ambiguous
- glmnetcv(X, y) in quickstart gives error HOT 1
- Logistic regression fails if y is a string of vectors HOT 1
- Multivariate normal L1 regression
- I cannot set the family as Binomial HOT 1
- `constraints` matrix changes after running glmnetcv
- `cv.meanloss` differs from `cv$cvm` in R
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glmnet.jl.