Displaying 1 result from an estimated 1 matches for "knnregtrain".
2011 Sep 02
2
How to keep the same class?
...uot;
Why not matrix? What am I missing here? Is there a way to keep the same
class?
The reason for the question is that I want to implement a k-step ahead
prediction for my own routines and R wrecks does not seem to like [1,] as
shown below.
> predict(fit10,testX[1,])
Error in knnregTrain(train = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, :
dims of 'test' and 'train differ
> predict(fit10,testX[1:2,])
[1] 81.00 76.36
Many thanks
Ed
[[alternative HTML version deleted]]