Learn R Programming

FastKNN (version 0.0.1)

knn_training_function: KNN Training The knn_training_function returns the labels for a training set using the k-Nearest Neighbors Clasification method.

Description

KNN Training The knn_training_function returns the labels for a training set using the k-Nearest Neighbors Clasification method.

Usage

knn_training_function(dataset, distance, label, k = 1)

Arguments

dataset
is a matrix with the features of the training set
distance
is a nxn matrix with the distance between each observation of the training set
label
is a nx1 vector with the labels of the training set
k
is from the numeric class and represent the number of neigbours to be use in the classifier.

Value

a k vector with the predicted labels for the training set. #'

Details

This function is use to check the quality of the Classifier. Because then the predicted labels are compared with the true labels

See Also

k.nearest.neighbors

sample