Displaying 5 results from an estimated 5 matches for "mypredict".
Did you mean:
mispredict
2005 Jun 24
1
mypredict.
Hi,
I am wondering what does "mypredict.lda<-function(object,
newdata)predict(object, newdata=newdata)$class" actually do?
I run a few errorest commands in the same function on the same dataset using
the same classifier lda. The only difference is some use "cv", other use
"boot" and "632plus". Th...
2003 Jun 24
1
errorest: Error in cv.numeric()
...010
...
180 1 299.5190 85.9201 -680.00000
181 2 1385.6801 298.8360 -353.00000
182 1 428.8740 130.8020 -328.00000
183 1 287.5540 98.0767 34.00000
Since predict.lda does not return simply the classification
it is wrapped, as in the docs:
mypredict.lda <- function(object, newdata) predict(object, newdata = newdata)$class
In trying errorest() I get the message
> errorest(class ~ hydrophobicity + charge, data=d, model=lda, predict=mypredict.lda)
Error in cv.numeric(y, formula, data, model = model, predict = predict, :
predi...
2005 Jun 23
1
errorest
...ipred package.
I am hoping to perform "bootstrap 0.632+" and "bootstrap leave one out".
According to the manual page for errorest, i use the following command:
ce632[i]<-errorest(ytrain ~., data=mydata, model=lda,
estimator=c("boot","632plus"), predict=mypredict.lda)$error
It didn't work. I then tried the following two commands:
ce632[i]<-errorest(ytrain ~., data=mydata, model=lda,
estimator=c("632plus"), est.para=control.errorest(nboot=B),
predict=mypredict.lda)$error
ceLOOB[i]<-errorest(ytrain ~., data=mydata, model=lda, estimato...
2004 Jan 09
3
ipred and lda
Dear all,
can anybody help me with the program below? The function predict.lda
seems to be defined but cannot be used by errortest.
The R version is 1.7.1
Thanks in advance,
Stefan
----------------
library("MASS");
library("ipred");
data(iris3);
tr <- sample(1:50, 25);
train <- rbind(iris3[tr,,1], iris3[tr,,2], iris3[tr,,3]);
test <- rbind(iris3[-tr,,1],
2011 Mar 23
2
predict.rpart help
Hi Everyone,
Is there a way to get predict.rpart() to return the nodes reached by the new examples in addition to the predicted probabilities it already returns? In other words, I would like to know the leaf node in the tree object that each new example data drops down to.
Thanks in advance for your help.
Osei