Description Usage Arguments Value Examples
This fit function just remembers the train data in the model
1 | fit.knn(data, fact, k = 3, metric = metric.cos)
|
data |
data.frame contains values of our training set (bag-of-words format of text) |
fact |
factor containing proper classification of the training samples in data set (one per observation) |
k |
number of the nearest neighbours taken into acount |
metric |
function implementing the metric of the similarity |
object of the class ptmKnn to use in predict function
1 | fit.knn(train.data, label, 5, metric.cos)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.