public class ClassificationResult extends Object
UNKNOWN_PROBABILITY
will be returned as default.Modifier and Type | Field and Description |
---|---|
static double |
UNKNOWN_PROBABILITY
Determines that no probability is available for this classification result
|
Constructor and Description |
---|
ClassificationResult(String label,
Class<?> clazz)
Creates a new classification result with the passed label and an unknown probability
|
ClassificationResult(String label,
double probability,
Class<?> clazz)
Creates a new classification result with the passed label and probability
|
Modifier and Type | Method and Description |
---|---|
String |
getLabel()
Returns the classified String
|
Object |
getObject()
Returns the object of the classification
|
double |
probability()
Returns the probability of the prediction
|
public static final double UNKNOWN_PROBABILITY
public ClassificationResult(String label, Class<?> clazz)
label
- the label of this classificationpublic ClassificationResult(String label, double probability, Class<?> clazz)
label
- the label of this classificationprobability
- the probability of the prediction. Must be either UNKNOWN_PROBABILITY
or a value ≥ 0 and ≤ 1.public Object getObject()
public double probability()
public String getLabel()
@enterprise 10.0.39257 Copyright © FREQUENTIS AG. All Rights Reserved.