I am running Knn algorithm in R studio. The packages that I am using is class:
- Version is 3.0.2 in Rstudio.
- Number of Tuples :50000
- Number of attributes : 8
The dataframe is Final_Data
and training and testing data frames are Train1
and Test1
.
I am getting the error as:
Error in if (inherits(X[[j]], "data.frame") && ncol(xj) > 1L) X[[j]] <- as.matrix(X[[j]]) :
missing value where TRUE/FALSE needed
I have cleared all the missing values .
Pls help me out in resolving this issue .
knn(Train1, Test1, "DepTime", k = 1, l = 0, prob = FALSE, use.all = FALSE).
The above knn function is the code that I am running and DepTime is class label.