knn {clustering} R Documentation

K-NN Classifier in R Programming

Description


K-Nearest Neighbor or K-NN is a Supervised Non-linear classification
algorithm. K-NN is a Non-parametric algorithm i.e it doesn’t make any
assumption about underlying data or its distribution. It is one of
the simplest and widely used algorithm which depends on it’s k value
(Neighbors) and finds it’s applications in many industries like
finance industry, healthcare industry etc.

Usage

knn(x,
    k = 16,
    jaccard = 0.6);

Arguments

x

-

k

[as integer]

jaccard

[as double]

env

[as Environment]

Details

In the KNN algorithm, K specifies the number of neighbors and its algorithm is as follows:

+ Choose the number K Of neighbor. + Take the K Nearest Neighbor Of unknown data point according To distance. + Among the K-neighbors, Count the number Of data points In Each category. + Assign the New data point To a category, where you counted the most neighbors. For the Nearest Neighbor classifier, the distance between two points Is expressed in the form of Euclidean Distance.

Authors

MLkit

Value

this function returns data object of type any kind.

clr value class

Examples


[Package clustering version 1.0.0.0 Index]