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
Modifier and TypeMethodDescriptionvoidaddValue(ClassificationScheme.Distance distance, double value) Specifies a new neighbor value and the distance to that neighbor.doubleGets the classification to assign based on the specified neighbors.voidInitialize the state of the classifier.
-
Method Details
-
initialize
void initialize()Initialize the state of the classifier. Called once for each query record. -
addValue
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
-