Description Usage Arguments Value Examples
Classify the input with a k nearest neighbors classifier.
1 |
data |
A data frame or a matrix where rows are observations and columns are features. If |
trueClasses |
A vector with labels for each row in |
memory |
A data frame or a matrix where rows are observations and columns are features. If |
k |
Number of neighbors that the classifier should use. It has to be an odd number. |
p |
Distance metric the classifier should use, the value can be either 1, 2 or Inf. |
type |
Whether the goal is to train the classifier or predict classes of new observations based on past ones. The value can be either "train" or "predict". |
A list with following elements: predictedClasses, prob, accuracy and errorCount.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.