search for: lasso

Displaying 20 results from an estimated 265 matches for "lasso".

Did you mean: lasse
2011 Jun 06
1
Lasso for k-subset regression
Dear R-users I'm trying to use lasso in lars package for subset regression, I have a large matrix of size 1000x100 and my aim is to select a subset k of the 100 variables. Is there any way in lars to fix the number k (i.e. to select the best 10 variables) library(lars) aa=lars(X,Y,type="lasso",max.steps=200) plot(aa,plo...
2011 Jul 12
7
FW: lasso regression
Hi, I am trying to do a lasso regression using the lars package with the following data (see attached): FastestTime WinPercentage PlacePercentage ShowPercentage BreakAverage FinishAverage Time7Average Time3Average Finish 116.90 0.14 0.14 0.29 4.43 3.29 117.56 117.77 5.00 116.23 0.29 0.43 0.14 6.14 2.14...
2010 Dec 06
2
How to get lasso fit coefficient(given penalty tuning parameter \lambda) using lars package
Hi, all, I am using the lars package for lasso estimate. So I get a lasso fit first: lassofit = lars(x,y,type ="lasso",normalize=T, intercept=T) Then I want to get coefficient with respect to a certain value of \lambda (the tuning parameter), I know lars has three mode options c("step", "fraction", "norm&quot...
2013 May 04
2
Lasso Regression error
Hi all, I have a data set containing variables LOSS, GDP, HPI and UE. (I have attached it in case it is required). Having renamed the variables as l,g,h and u, I wish to run a Lasso Regression with l as the dependent variable and all the other 3 as the independent variables. data=read.table("data.txt", header=T) l=data$LOSS h=data$HPI u=data$UE g=data$GDP matrix=data.frame(l,g,h,u) lasso=lars(matrix,l) But R is throwing an error (shown below) at this: Error in r...
2012 May 13
1
R package dependency issues when namespace is not attached
...led without attaching 'Child' to the search path, the function in 'Parent' cannot be found. Here an example from the manual of the?bigdata?package, but the problem is very widespread: x = matrix(rnorm(50*80),50,80) beta = c(3,2,1.5,rep(0,77)) y = rnorm(50) + x%*%beta z1 = bigdata::lasso.stars(x,y) The example fails because lasso.stars depends on 'glmnet' which is not loaded until?bigdata?is attached. The only way to be able to call lasso.stars?is to actually attach the?bigdata?package: library(bigdata) z1 = bigdata::lasso.stars(x,y) Now to further complicate things, it...
2007 Jun 12
1
LASSO coefficients for a specific s
Hello, I have a question about the lars package. I am using this package to get the coefficients at a specific LASSO parameter s. data(diabetes) attach(diabetes) object <- lars(x,y,type="lasso") cvres<-cv.lars(x,y,K=10,fraction = seq(from = 0, to = 1, length = 100)) fits <- predict.lars(object, type="coefficients", s=0.1, mode="fraction") Can I assign automatically th...
2012 Jun 16
0
Selecting correlated predictors with LASSO
...chooses the variable that is most correlated with y. The next variable to enter the model is the one that is most correlated with the residuals. Indeed, it is x4: > round((cor(cbind(resid(lm(y~x1)),x))[1,3:6]),4) x2 x3 x4 x5 0.1163 0.2997 0.9246 0.0037 Now, if I do the 'lasso' option: > m <- lars(x,y,"lasso",trace=T) LASSO sequence Computing X'X .... LARS Step 1 : Variable 1 added LARS Step 2 : Variable 2 added LARS Step 3 : Variable 4 added LARS Step 4 : Variable 3 added LARS Step 5 : Variable 5 added It adds...
2009 May 07
2
lasso based selection for mixed model
Dear useRs (called Frank Harrell, most likely), after having preached for years to my medical colleagues to be cautious with stepwise selection procedures, they chanted back asking for an alternative when using mixed models. There is a half dozen laXXX packages around for all types of linear models, but as far I see there is none for mixed models such as lme. Even boot.stepAIC (which I
2011 May 02
2
Lasso with Categorical Variables
Hi! This is my first time posting. I've read the general rules and guidelines, but please bear with me if I make some fatal error in posting. Anyway, I have a continuous response and 29 predictors made up of continuous variables and nominal and ordinal categorical variables. I'd like to do lasso on these, but I get an error. The way I am using "lars" doesn't allow for the factors. Is there a special option or some other method in order to do lasso with cat. variables? Here is and example (considering ordinal variables as just nominal): set.seed(1) Y <- rnorm(10,0,1) X1 &...
2007 Aug 02
2
lasso/lars error
I'm having the exact problem outlined in a previous post from 2005 - unfortunately the post was never answered: http://tolstoy.newcastle.edu.au/R/help/05/10/15055.html When running: lm2=lars(x2,y,type="lasso",use.Gram=F) I get an error: Error in if (zmin < gamhat) { : missing value where TRUE/FALSE needed ...when running lasso via lars() on a 67x3795 set of predictors. I hacked the lars() function to print out the zmin, gamhat, and also z1 values (used to calculate zmin) - it seems that the...
2011 May 28
1
Questions regrading the lasso and glmnet
...have about 20 terms, out of the original 116. (A standard BIC step-down would retain more like 100 terms, with only a very slightly better prediction rate.) So that was working OK, but in discussions with the folks on this list (thanks everybody for your help!), I have been exploring using the lasso for this instead, to avoid the problems with step-down, gain the benefits of shrinkage, and so forth; clearly it should be much better than my homegrown model selection procedure. I've been reading about the lasso in Tibshirani (1996) and in The Elements of Statistical Learning. I'm using...
2010 Jan 06
0
parcor 0.2-2 - Regularized Partial Correlation Matrices with (adaptive) Lasso, PLS, and Ridge Regression
Dear R-users, we are happy to announce the release of our R package parcor. The package contains tools to estimate the matrix of partial correlations based on different regularized regression methods: Lasso, adaptive Lasso, PLS, and Ridge Regression. In addition, parcor provides cross-validation based model selection for Lasso, adaptive Lasso and Ridge Regression. More details can be found in the accompanying article Nicole Kr?mer, Juliane Sch?fer, Anne-Laure Boulesteix. Regularized Estimation of...
2010 Jan 06
0
parcor 0.2-2 - Regularized Partial Correlation Matrices with (adaptive) Lasso, PLS, and Ridge Regression
Dear R-users, we are happy to announce the release of our R package parcor. The package contains tools to estimate the matrix of partial correlations based on different regularized regression methods: Lasso, adaptive Lasso, PLS, and Ridge Regression. In addition, parcor provides cross-validation based model selection for Lasso, adaptive Lasso and Ridge Regression. More details can be found in the accompanying article Nicole Kr?mer, Juliane Sch?fer, Anne-Laure Boulesteix. Regularized Estimation of...
2012 Jun 05
1
Piecewise Lasso Regression
Hi All, I am trying to fit a piecewise lasso regression, but package Segmented does not work with Lars objects. Does any know of any package or implementation of piecewise lasso regression? Thanks, Lucas
2009 Aug 21
1
LASSO: glmpath and cv.glmpath
Hi, perhaps you can help me to find out, how to find the best Lambda in a LASSO-model. I have a feature selection problem with 150 proteins potentially predicting Cancer or Noncancer. With a lasso model fit.glm <- glmpath(x=as.matrix(X), y=target, family="binomial") (target is 0, 1 <- Cancer non cancer, X the proteins, numerical in expression), I get follo...
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 <- sw...
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 nu...
2009 Mar 17
1
Double Cross validation for LASSO
Dear R user, I am looking for a code on double cross validation in LASSO , one for optimizing the parameter and other one is for MSEP. If any one have it, please foroward to me. I am using different package like LARS, chemometric etc. Thanks in advance Alex [[alternative HTML version deleted]]
2010 Dec 22
1
code of applying lasso method in cox model
I also hope to get the code of using lasso method in the cox model.Could you please send me one? Thank you so much!!!
2012 May 05
0
penalized quantile regression (rq.fit.lasso)
Dear all: I have a question about how to get the optimal estimate of coefficients using the penalized quantile regression (LASSO penalty in quantile regression defined in Koenker 2005). In R, I found both rq(y ~ x, method="lasso",lambda = 30) and rq.fit.lasso(x, y, tau = 0.5, lambda = 1, beta = .9995, eps = 1e-06) can give the estimates. But, I didn't find a way using either of these command to get the optimal...