fit.knn: Function fit.knn implements model building algorithm of k...

Description Usage Arguments Value Examples

Description

This fit function just remembers the train data in the model

Usage

1
fit.knn(data, fact, k = 3, metric = metric.cos)

Arguments

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

Value

object of the class ptmKnn to use in predict function

Examples

1
fit.knn(train.data, label, 5, metric.cos)

vovkaOst/TextClassifier documentation built on May 3, 2019, 6:41 p.m.