search for: bestcoef

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

2011 May 24
1
seeking help on using LARS package
...exp(-10) # code from JP Vert object1 <- cv.lars(xtrain,ytrain, K=nfolds, fraction = seq(from = 0, to = 1 , length= 1000), type='lasso', eps=epsilon, plot.it=TRUE) bestfraction <- object1$fraction[min(which(object1$cv <= min(object1$cv)+ 0.01*(max(object1$cv)-min(object1$cv))))] bestcoef <- coef(object1,s=bestfraction,mode='fraction') # this gives bestcoef as NULL, I don't know why. # End code from Jp Vert # Code by me:: Not so sure about the authenticity of this-- predictor <- lars(trainData,trainScore, type='lasso', eps=epsilon,trace=TRUE ) reslt<...