Skip to content
Prev 44689 / 398530 Next

outputs of KNN prediction

Hello there:

I got 13 variables in my training/target set, the first 12 variables are
mixture of numerical and categorical variables. The last one is the one I
need
to predict, and it is a numerical variable.
I got output on the screen as following

 8.10832229  8.831127635 7.592870288 8.521782644 6.376726948 6.914730893
 9.71534911  8.658171785 6.104793232 7.247080585 6.298949247 5.105945474
 7.508238775 7.65396918  8.831127635 7.912056888 6.381816017 7.211556733

 276 levels ............

Then I tried to calculate a formula:(actual-pred)/actual, which includes
pred
values. However, I cannot do this even I convert the factors in pred to
vectors. Can anybody help??

Thank you very much indeed,

Qin