public class Prediction
extends java.lang.Object
implements java.io.Serializable
The output from a Predict operation:
Details - Contains the following attributes:
DetailsAttributes.PREDICTIVE_MODEL_TYPE - REGRESSION | BINARY | MULTICLASS
DetailsAttributes.ALGORITHM - SGD
PredictedLabel - Present for either a BINARY or
MULTICLASS MLModel request.
PredictedScores - Contains the raw classification score
corresponding to each label.
PredictedValue - Present for a REGRESSION
MLModel request.
| Constructor and Description |
|---|
Prediction() |
| Modifier and Type | Method and Description |
|---|---|
Prediction |
adddetailsEntry(java.lang.String key,
java.lang.String value)
Provides any additional details regarding the prediction.
|
Prediction |
addpredictedScoresEntry(java.lang.String key,
java.lang.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(java.lang.Object obj) |
java.util.Map<java.lang.String,java.lang.String> |
getDetails()
Provides any additional details regarding the prediction.
|
java.lang.String |
getPredictedLabel()
The prediction label for either a
BINARY or
MULTICLASS MLModel. |
java.util.Map<java.lang.String,java.lang.Float> |
getPredictedScores()
Provides the raw classification score corresponding to each label.
|
java.lang.Float |
getPredictedValue()
The prediction value for
REGRESSION MLModel. |
int |
hashCode() |
void |
setDetails(java.util.Map<java.lang.String,java.lang.String> details)
Provides any additional details regarding the prediction.
|
void |
setPredictedLabel(java.lang.String predictedLabel)
The prediction label for either a
BINARY or
MULTICLASS MLModel. |
void |
setPredictedScores(java.util.Map<java.lang.String,java.lang.Float> predictedScores)
Provides the raw classification score corresponding to each label.
|
void |
setPredictedValue(java.lang.Float predictedValue)
The prediction value for
REGRESSION MLModel. |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Prediction |
withDetails(java.util.Map<java.lang.String,java.lang.String> details)
Provides any additional details regarding the prediction.
|
Prediction |
withPredictedLabel(java.lang.String predictedLabel)
The prediction label for either a
BINARY or
MULTICLASS MLModel. |
Prediction |
withPredictedScores(java.util.Map<java.lang.String,java.lang.Float> predictedScores)
Provides the raw classification score corresponding to each label.
|
Prediction |
withPredictedValue(java.lang.Float predictedValue)
The prediction value for
REGRESSION MLModel. |
public java.lang.String getPredictedLabel()
The prediction label for either a BINARY or
MULTICLASS MLModel.
Constraints:
Length: 1 -
The prediction label for either a BINARY or
MULTICLASS MLModel.
public void setPredictedLabel(java.lang.String predictedLabel)
The prediction label for either a BINARY or
MULTICLASS MLModel.
Constraints:
Length: 1 -
predictedLabel -
The prediction label for either a BINARY or
MULTICLASS MLModel.
public Prediction withPredictedLabel(java.lang.String predictedLabel)
The prediction label for either a BINARY or
MULTICLASS MLModel.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
predictedLabel -
The prediction label for either a BINARY or
MULTICLASS MLModel.
public java.lang.Float getPredictedValue()
REGRESSION MLModel.REGRESSION
MLModel.public void setPredictedValue(java.lang.Float predictedValue)
REGRESSION MLModel.predictedValue - The prediction value for REGRESSION
MLModel.public Prediction withPredictedValue(java.lang.Float predictedValue)
REGRESSION MLModel.
Returns a reference to this object so that method calls can be chained together.
predictedValue - The prediction value for REGRESSION
MLModel.public java.util.Map<java.lang.String,java.lang.Float> getPredictedScores()
public void setPredictedScores(java.util.Map<java.lang.String,java.lang.Float> predictedScores)
predictedScores - Provides the raw classification score
corresponding to each label.public Prediction withPredictedScores(java.util.Map<java.lang.String,java.lang.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(java.lang.String key, java.lang.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 java.util.Map<java.lang.String,java.lang.String> getDetails()
public void setDetails(java.util.Map<java.lang.String,java.lang.String> details)
details - Provides any additional details regarding the prediction.public Prediction withDetails(java.util.Map<java.lang.String,java.lang.String> details)
Returns a reference to this object so that method calls can be chained together.
details - Provides any additional details regarding the prediction.public Prediction adddetailsEntry(java.lang.String key, java.lang.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 java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2018 Amazon Web Services, Inc. All Rights Reserved.