KernelType enum
A type of a kernel function.
Defines a way the weights of the nearest observations are being calculated for K nearest neighbours algorithm (KNN).
Pure KNN algorithm does not consider how far is a particular observation from the target one and it generally leads to imprecise prediction.
To avoid such a behaviour, one may use a kernel function, that accepts a distance between an observation being evaluated and the target one and returns a weight denoting, how much the evaluating observation will contribute in prediction for the target one.
Constructors
- KernelType()
-
const
Values
- uniform → const KernelType
-
A kernel that calculates weights using the following formula:
- epanechnikov → const KernelType
-
A kernel that calculates weights using the following formula:
- cosine → const KernelType
-
A kernel that calculates weights using the following formula:
- gaussian → const KernelType
-
A kernel that calculates weights using the following formula:
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
KernelType> - A constant List of the values in this enum, in order of their declaration.