Package com.groiss.ml.classifier
Class ClassificationResult<T>
java.lang.Object
com.groiss.ml.classifier.ClassificationResult<T>
Represents the label of a classification prediction along with the probability of that prediction.
If no such probability is provided
UNKNOWN_PROBABILITY
will be returned as default.-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
Determines that no probability is available for this classification result -
Constructor Summary
ConstructorDescriptionClassificationResult
(T label) Creates a new classification result with the passed label and an unknown probabilityClassificationResult
(T label, double probability) Creates a new classification result with the passed label and probability -
Method Summary
-
Field Details
-
UNKNOWN_PROBABILITY
public static final double UNKNOWN_PROBABILITYDetermines that no probability is available for this classification result- See Also:
-
-
Constructor Details
-
ClassificationResult
Creates a new classification result with the passed label and an unknown probability- Parameters:
label
- the label of this classification
-
ClassificationResult
Creates a new classification result with the passed label and probability- Parameters:
label
- the label of this classificationprobability
- the probability of the prediction. Must be eitherUNKNOWN_PROBABILITY
or a value ≥ 0 and ≤ 1.
-
-
Method Details