KNNModel class

Simple object wrapper for k-NN storing training data and exposing predict.

Constructors

KNNModel()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fit(List<List<double>> X, List<int> y, {int k = 3}) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
predict(List<List<double>> Q) List<int>
predictOne(List<double> q) int
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited