search for: cvglmnet

Displaying 1 result from an estimated 1 matches for "cvglmnet".

2011 May 01
1
Different results of coefficients by packages penalized and glmnet
...alized=~CN+NoSus,lambda1=opt$lambda,model="logistic",standardize=TRUE) coef(pena.fit2) #lasso using gamnet library(glmnet) factors<-matrix(c(CN,NoSus),ncol=2) colnames(factors)<-c("CN","NoSus") glmn.fit2<-glmnet(x=factors,y=HRLNM,family="binomial") cvglmnet<-cv.glmnet(x=factors,y=HRLNM,family="binomial",nfolds=5) plot(cvglmnet) cvglmnet$lambda.min which(cvglmnet$lambda==cvglmnet$lambda.min) glmn.fit2<-glmnet(x=factors,y=HRLNM,family="binomial",lambda=cvglmnet$lambda.min) coef(glmn.fit2) Thanks a lot btw: how to calculate...