public class Prediction extends Object implements Serializable
Output from a predict operation.
Constructor and Description |
---|
Prediction() |
Modifier and Type | Method and Description |
---|---|
Prediction |
addDetailsEntry(String key,
String value)
Provides any additional details regarding the prediction
|
Prediction |
addPredictedScoresEntry(String key,
Float value)
Provides the raw classification score corresponding to each label.
|
Prediction |
clearDetailsEntries()
Removes all the entries added into Details.
|
Prediction |
clearPredictedScoresEntries()
Removes all the entries added into PredictedScores.
|
boolean |
equals(Object obj) |
Map<String,String> |
getDetails()
Provides any additional details regarding the prediction
|
String |
getPredictedLabel()
Returns the value of the PredictedLabel property for this object.
|
Map<String,Float> |
getPredictedScores()
Provides the raw classification score corresponding to each label.
|
Float |
getPredictedValue()
Returns the value of the PredictedValue property for this object.
|
int |
hashCode() |
void |
setDetails(Map<String,String> details)
Provides any additional details regarding the prediction
|
void |
setPredictedLabel(String predictedLabel)
Sets the value of the PredictedLabel property for this object.
|
void |
setPredictedScores(Map<String,Float> predictedScores)
Provides the raw classification score corresponding to each label.
|
void |
setPredictedValue(Float predictedValue)
Sets the value of the PredictedValue property for this object.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Prediction |
withDetails(Map<String,String> details)
Provides any additional details regarding the prediction
|
Prediction |
withPredictedLabel(String predictedLabel)
Sets the value of the PredictedLabel property for this object.
|
Prediction |
withPredictedScores(Map<String,Float> predictedScores)
Provides the raw classification score corresponding to each label.
|
Prediction |
withPredictedValue(Float predictedValue)
Sets the value of the PredictedValue property for this object.
|
public String getPredictedLabel()
Constraints:
Length: 1 -
public void setPredictedLabel(String predictedLabel)
Constraints:
Length: 1 -
predictedLabel
- The new value for the PredictedLabel property for this object.public Prediction withPredictedLabel(String predictedLabel)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
predictedLabel
- The new value for the PredictedLabel property for this object.public Float getPredictedValue()
public void setPredictedValue(Float predictedValue)
predictedValue
- The new value for the PredictedValue property for this object.public Prediction withPredictedValue(Float predictedValue)
Returns a reference to this object so that method calls can be chained together.
predictedValue
- The new value for the PredictedValue property for this object.public Map<String,Float> getPredictedScores()
public void setPredictedScores(Map<String,Float> predictedScores)
predictedScores
- Provides the raw classification score corresponding to each label.public Prediction withPredictedScores(Map<String,Float> predictedScores)
Returns a reference to this object so that method calls can be chained together.
predictedScores
- Provides the raw classification score corresponding to each label.public Prediction addPredictedScoresEntry(String key, Float value)
The method adds a new key-value pair into PredictedScores parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into PredictedScores.value
- The corresponding value of the entry to be added into PredictedScores.public Prediction clearPredictedScoresEntries()
Returns a reference to this object so that method calls can be chained together.
public Map<String,String> getDetails()
public void setDetails(Map<String,String> details)
details
- Provides any additional details regarding the predictionpublic Prediction withDetails(Map<String,String> details)
Returns a reference to this object so that method calls can be chained together.
details
- Provides any additional details regarding the predictionpublic Prediction addDetailsEntry(String key, String value)
The method adds a new key-value pair into Details parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into Details.value
- The corresponding value of the entry to be added into Details.public Prediction clearDetailsEntries()
Returns a reference to this object so that method calls can be chained together.
public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.