<$BlogRSDUrl$>

Saturday, September 27, 2008

Can you explain again the purpose of the trunc command in the CV code?

Suppose there are n=23 rows in the dataset. So, what I want to generate is 1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3. trunc(n/10) is trunc(2.3) which is 2. I add one to that to get 3. Then I generate 1,2,3,4,5,6,7,8,9,10 three times and keep the first 23. There *has* to be a better way...


Also, what are you doing with the code - mylm<-l1ce(y ~ .,data=bank[cvIndex!=j,],bound=candidateBounds[k]) ? I know you are trying to develop the model using all observations that are not j, but what is l1ce and what is the bound command?

l1ce is the lasso regression function in the R package lasso2. The bound parameter is what we called "s" in class.

This page is powered by Blogger. Isn't yours?