Re: [R] kknn and logistic regression: how to cross-validate binary prediction

2010-03-16 Thread Max Kuhn
Take a look at the caret package http://cran.r-project.org/web/packages/caret/index.html and the package vignettes, especially the one labeled as "model builing". Max On Mar 15, 2010, at 6:11 PM, noclue_ wrote: I am comparing kknn and logistic regression for binary outcome predictio

[R] kknn and logistic regression: how to cross-validate binary prediction

2010-03-15 Thread noclue_
I am comparing kknn and logistic regression for binary outcome prediction - For kknn, I can do - kknn_<-kknn(out_come ~ age + gender , learn_, valid_) fit<-fitted(kknn_) table(valid_$out_come, fit) to get validation results in cross-tabulation. - For logistic, how can I do the equival