Package com.datarobot.prediction
Interface IClassificationPredictor
-
- All Superinterfaces:
IEventProvider<ClassificationScoreEventInfo>,IPredictorInfo
public interface IClassificationPredictor extends IPredictorInfo, IEventProvider<ClassificationScoreEventInfo>
Interface for multi class and binary classification models.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]getClassLabels()Model specific class labels that will be predicted.Map<String,Double>score(Iterable<?> row)Scores a single row.Map<String,Double>score(Map<String,?> row)Scores a single row.Score<Map<String,Double>>scoreWithExplanations(Iterable<?> row)Scoring with the default prediction explanations parameters.Score<Map<String,Double>>scoreWithExplanations(Iterable<?> row, ExplanationParams predictionExplanationParams)Scoring with some overridden prediction explanation parameters.Score<Map<String,Double>>scoreWithExplanations(Map<String,?> row)Scoring with the default prediction explanations parameters.Score<Map<String,Double>>scoreWithExplanations(Map<String,?> row, ExplanationParams predictionExplanationParams)Scoring with some overridden prediction explanation parameters.-
Methods inherited from interface com.datarobot.prediction.IEventProvider
getScoreEvent
-
Methods inherited from interface com.datarobot.prediction.IPredictorInfo
getDefaultPredictionExplanationParams, getFeatures, getModelId, getModelInfo, getPredictorClass
-
-
-
-
Method Detail
-
getClassLabels
String[] getClassLabels()
Model specific class labels that will be predicted.NOTE:
These labels will be used as a key set for outputs of
score(Iterable)andscore(Map).- Returns:
- array of class labels.
-
score
Map<String,Double> score(Map<String,?> row)
Scores a single row.- Parameters:
row- row with feature values.- Returns:
- class label to its probability.
-
score
Map<String,Double> score(Iterable<?> row)
Scores a single row.NOTE:
Here
Iterable<?> rowis the feature values in the same order as they goes inIPredictorInfo.getFeatures().- Parameters:
row- row with feature values in right order.- Returns:
- class label to its probability.
-
scoreWithExplanations
Score<Map<String,Double>> scoreWithExplanations(Map<String,?> row)
Scoring with the default prediction explanations parameters.- Returns:
- scores with explanations.
-
scoreWithExplanations
Score<Map<String,Double>> scoreWithExplanations(Iterable<?> row)
Scoring with the default prediction explanations parameters.- Returns:
- scores with explanations.
-
scoreWithExplanations
Score<Map<String,Double>> scoreWithExplanations(Map<String,?> row, ExplanationParams predictionExplanationParams)
Scoring with some overridden prediction explanation parameters.- Parameters:
predictionExplanationParams- prediction explanations parameters to override.- Returns:
- scores with explanations.
-
scoreWithExplanations
Score<Map<String,Double>> scoreWithExplanations(Iterable<?> row, ExplanationParams predictionExplanationParams)
Scoring with some overridden prediction explanation parameters.- Parameters:
predictionExplanationParams- prediction explanations parameters to override.- Returns:
- scores with explanations.
-
-