Displaying 2 results from an estimated 2 matches for "cvtest".
Did you mean:
dvtest
2012 Dec 18
2
how to get a value from a list (using paste function)?
Dear my R friends,
I want to get a number from a list using paste function.
In my example,
lambda.rule <- "lambda.1se"
cvtest is a list (result from cv.glmnet)
and
cvtest$lambda.1se
[1] 1.308973
I want to call the value using paste function.
I used get function but there was an error.
test <- get(paste("cvtest$",lambda.rule, sep=""))
Error in get(paste("cvtest$", lambda.rule, sep = "...
2004 Jan 20
1
random forest question
...ed that for example classwt=c(0.45,0.1,0.45) would result in fewer
cases classified as class 2. Did I understand something wrong?
Christian
x1rf <- randomForest(x=as.data.frame(mfilters[cvtrain,]),
y=as.factor(traingroups),
xtest=as.data.frame(mfilters[cvtest,]),
ytest=as.factor(testgroups))
> x1rf$test$confusion
1 2 3 class.error
1 9954 30 19 0.00489853
2 139 1854 0 0.06974410
3 420 0 84 0.83333333
x1rf <- randomForest(x=as.data.frame(mfilters[cvtrain,]),
y=as.factor(traingroups),...