Module datarush.analytics
Interface ClassificationScheme.Classifier
-
- Enclosing class:
- ClassificationScheme
public static interface ClassificationScheme.Classifier
Resolves the class of a query record from a set of neighbors.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addValue(ClassificationScheme.Distance distance, double value)
Specifies a new neighbor value and the distance to that neighbor.double
getClassification()
Gets the classification to assign based on the specified neighbors.void
initialize()
Initialize the state of the classifier.
-
-
-
Method Detail
-
initialize
void initialize()
Initialize the state of the classifier. Called once for each query record.
-
addValue
void addValue(ClassificationScheme.Distance distance, double value)
Specifies a new neighbor value and the distance to that neighbor.Called once per neighbor for each query record. Neighbors will be provided in order of increasing distance. That is, the first value is always of the nearest neighbor.
- Parameters:
distance
- the distance to the neighborvalue
- the neighbor's classification
-
getClassification
double getClassification()
Gets the classification to assign based on the specified neighbors. Called once for each query record.- Returns:
- the resulting classification
-
-