similar to: Questions regrading the lasso and glmnet

Displaying 20 results from an estimated 10000 matches similar to: "Questions regrading the lasso and glmnet"

2013 Jul 06
1
problem with BootCV for coxph in pec after feature selection with glmnet (lasso)
Hi, I am attempting to evaluate the prediction error of a coxph model that was built after feature selection with glmnet. In the preprocessing stage I used na.omit (dataset) to remove NAs. I reconstructed all my factor variables into binary variables with dummies (using model.matrix) I then used glmnet lasso to fit a cox model and select the best performing features. Then I fit a coxph model
2010 Jul 31
1
Feature selection via glmnet package (LASSO)
Hello, I'm trying to select features of cetain numbers(like 100 out of 1000) via LASSO, based on multinomial model, however, it seems the glmnet package provides a very sparse estimation of coefficients(most of coefficients are 0), which selects very few number of variables, like only 10, based on my easy dataset. I try to connect the choice of lambda to the selecting
2011 Jul 22
4
glmnet with binary logistic regression
Hi all, I am using the glmnet R package to run LASSO with binary logistic regression. I have over 290 samples with outcome data (0 for alive, 1 for dead) and over 230 predictor variables. I currently using LASSO to reduce the number of predictor variables. I am using the cv.glmnet function to do 10-fold cross validation on a sequence of lambda values which I let glmnet determine. I then take
2011 May 01
1
Different results of coefficients by packages penalized and glmnet
Dear R users: Recently, I learn to use penalized logistic regression. Two packages (penalized and glmnet) have the function of lasso. So I write these code. However, I got different results of coef. Can someone kindly explain. # lasso using penalized library(penalized) pena.fit2<-penalized(HRLNM,penalized=~CN+NoSus,lambda1=1,model="logistic",standardize=TRUE) pena.fit2
2012 Mar 16
0
How to interpret glmnet lasso error
I get an error when I try to use glmnet to fit a lasso model on some data. My code: > lasso <- glmnet(predictorPartitionTrainingM, targetPartitionTraining, alpha=1) The error that is returned: Error in elnet(x, is.sparse, ix, jx, y, weights, offset, type.gaussian, : NA/NaN/Inf in foreign function call (arg 5) Some potentially important details: - 50 predictor variables - 300
2011 Mar 25
2
A question on glmnet analysis
Hi, I am trying to do logistic regression for data of 104 patients, which have one outcome (yes or no) and 15 variables (9 categorical factors [yes or no] and 6 continuous variables). Number of yes outcome is 25. Twenty-five events and 15 variables mean events per variable is much less than 10. Therefore, I tried to analyze the data with penalized regression method. I would like please some of the
2011 Aug 10
2
glmnet
Hi All,  I have been trying to use glmnet package to do LASSO linear regression. my x data is a matrix n_row by n_col and y is a vector of size n_row corresponding to the vector data. The number of n_col is much more larger than the number of n_row. I do the following: fits = glmnet(x, y, family="multinomial")I have been following this
2010 Jun 02
2
glmnet strange error message
Hello fellow R users, I have been getting a strange error message when using the cv.glmnet function in the glmnet package. I am attempting to fit a multinomial regression using the lasso. covars is a matrix with 80 rows and roughly 4000 columns, all the covariates are binary. resp is an eight level factor. I can fit the model with no errors but when I try to cross-validate after about 30 seconds
2012 Mar 27
2
lasso constraint
In the package lasso2, there is a Prostate Data. To find coefficients in the prostate cancer example we could impose L1 constraint on the parameters. code is: data(Prostate) p.mean <- apply(Prostate, 5,mean) pros <- sweep(Prostate, 5, p.mean, "-") p.std <- apply(pros, 5, var) pros <- sweep(pros, 5, sqrt(p.std),"/") pros[, "lpsa"] <-
2013 Jul 17
1
glmnet on Autopilot
Dear List, I'm running simulations using the glmnet package. I need to use an 'automated' method for model selection at each iteration of the simulation. The cv.glmnet function in the same package is handy for that purpose. However, in my simulation I have p >> N, and in some cases the selected model from cv.glmet is essentially shrinking all coefficients to zero. In this case,
2023 Oct 22
1
running crossvalidation many times MSE for Lasso regression
Dear R-experts, Here below my R code with an error message. Can somebody help me to fix this error?? Really appreciate your help. Best, ############################################################ #?MSE CROSSVALIDATION Lasso regression? library(glmnet) ?
2023 Oct 23
1
running crossvalidation many times MSE for Lasso regression
Dear R-experts, I really thank you all a lot for your responses. So, here is the error (and warning) messages at the end of my R code. Many thanks for your help. Error in UseMethod("predict") : ? no applicable method for 'predict' applied to an object of class "c('matrix', 'array', 'double', 'numeric')" > mean(unlist(lst)) [1] NA
2023 Oct 22
2
running crossvalidation many times MSE for Lasso regression
No error message shown Please include the error message so that it is not necessary to rerun your code. This might enable someone to see the problem without running the code (e.g. downloading packages, etc.) -- Bert On Sun, Oct 22, 2023 at 1:36?PM varin sacha via R-help <r-help at r-project.org> wrote: > > Dear R-experts, > > Here below my R code with an error message. Can
2023 Oct 23
2
running crossvalidation many times MSE for Lasso regression
For what it's worth it looks like spm2 is specifically for *spatial* predictive modeling; presumably its version of CV is doing something spatially aware. I agree that glmnet is old and reliable. One might want to use a tidymodels wrapper to create pipelines where you can more easily switch among predictive algorithms (see the `parsnip` package), but otherwise sticking to glmnet
2023 Oct 24
1
running crossvalidation many times MSE for Lasso regression
?s 20:12 de 23/10/2023, varin sacha via R-help escreveu: > Dear R-experts, > > I really thank you all a lot for your responses. So, here is the error (and warning) messages at the end of my R code. > > Many thanks for your help. > > > Error in UseMethod("predict") : > ? no applicable method for 'predict' applied to an object of class
2008 Jun 02
0
New glmnet package on CRAN
glmnet is a package that fits the regularization path for linear, two- and multi-class logistic regression models with "elastic net" regularization (tunable mixture of L1 and L2 penalties). glmnet uses pathwise coordinate descent, and is very fast. Some of the features of glmnet: * by default it computes the path at 100 uniformly spaced (on the log scale) values of the
2008 Jun 02
0
New glmnet package on CRAN
glmnet is a package that fits the regularization path for linear, two- and multi-class logistic regression models with "elastic net" regularization (tunable mixture of L1 and L2 penalties). glmnet uses pathwise coordinate descent, and is very fast. Some of the features of glmnet: * by default it computes the path at 100 uniformly spaced (on the log scale) values of the
2010 Apr 04
0
Major glmnet upgrade on CRAN
glmnet_1.2 has been uploaded to CRAN. This is a major upgrade, with the following additional features: * poisson family, with dense or sparse x * Cox proportional hazards family, for dense x * wide range of cross-validation features. All models have several criteria for cross-validation. These include deviance, mean absolute error, misclassification error and "auc" for logistic or
2010 Apr 04
0
Major glmnet upgrade on CRAN
glmnet_1.2 has been uploaded to CRAN. This is a major upgrade, with the following additional features: * poisson family, with dense or sparse x * Cox proportional hazards family, for dense x * wide range of cross-validation features. All models have several criteria for cross-validation. These include deviance, mean absolute error, misclassification error and "auc" for logistic or
2013 Mar 02
0
glmnet 1.9-3 uploaded to CRAN (with intercept option)
This update adds an intercept option (by popular request) - now one can fit a model without an intercept Glmnet is a package that fits the regularization path for a number of generalized linear models, with with "elastic net" regularization (tunable mixture of L1 and L2 penalties). Glmnet uses pathwise coordinate descent, and is very fast. The current list of models covered are: