LearnKit v0.0.9 LearnKit.Knn View Source

Module for k-nearest neighbours (knn) algorithm

Link to this section Summary

Functions

Add train data to classificator

Classify label of the new feature Available options: feature - feature for classification, required, example: [1, 2, 3] k - number of nearest neighbours, default is 3, optional algorithm - brute, optional weight - uniform/distance, default is uniform, optional

Creates classificator with empty data_set

Creates classificator with data_set

Link to this section Functions

Link to this function add_train_data(knn, arg) View Source

Add train data to classificator

Link to this function classify(knn, options \\ []) View Source

Classify label of the new feature Available options: feature - feature for classification, required, example: [1, 2, 3] k - number of nearest neighbours, default is 3, optional algorithm - brute, optional weight - uniform/distance, default is uniform, optional

Creates classificator with empty data_set

Creates classificator with data_set