S******y 发帖数: 1123 | 1 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. |
|