public class Prediction
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
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.
Modifier and Type | Field and Description |
---|---|
private SdkInternalMap<java.lang.String,java.lang.String> |
details |
private java.lang.String |
predictedLabel
The prediction label for either a BINARY or MULTICLASS
MLModel . |
private SdkInternalMap<java.lang.String,java.lang.Float> |
predictedScores |
private java.lang.Float |
predictedValue
The prediction value for REGRESSION
MLModel . |
Constructor and Description |
---|
Prediction() |
Modifier and Type | Method and Description |
---|---|
Prediction |
addDetailsEntry(java.lang.String key,
java.lang.String value) |
Prediction |
addPredictedScoresEntry(java.lang.String key,
java.lang.Float value) |
Prediction |
clearDetailsEntries()
Removes all the entries added into Details.
|
Prediction |
clearPredictedScoresEntries()
Removes all the entries added into PredictedScores.
|
Prediction |
clone() |
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,java.lang.String> |
getDetails() |
java.lang.String |
getPredictedLabel()
The prediction label for either a BINARY or MULTICLASS
MLModel . |
java.util.Map<java.lang.String,java.lang.Float> |
getPredictedScores() |
java.lang.Float |
getPredictedValue()
The prediction value for REGRESSION
MLModel . |
int |
hashCode() |
void |
setDetails(java.util.Map<java.lang.String,java.lang.String> details) |
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) |
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) |
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) |
Prediction |
withPredictedValue(java.lang.Float predictedValue)
The prediction value for REGRESSION
MLModel . |
private java.lang.String predictedLabel
MLModel
.private java.lang.Float predictedValue
MLModel
.private SdkInternalMap<java.lang.String,java.lang.Float> predictedScores
private SdkInternalMap<java.lang.String,java.lang.String> details
public void setPredictedLabel(java.lang.String predictedLabel)
MLModel
.predictedLabel
- The prediction label for either a BINARY or MULTICLASS
MLModel
.public java.lang.String getPredictedLabel()
MLModel
.MLModel
.public Prediction withPredictedLabel(java.lang.String predictedLabel)
MLModel
.predictedLabel
- The prediction label for either a BINARY or MULTICLASS
MLModel
.public void setPredictedValue(java.lang.Float predictedValue)
MLModel
.predictedValue
- The prediction value for REGRESSION MLModel
.public java.lang.Float getPredictedValue()
MLModel
.MLModel
.public Prediction withPredictedValue(java.lang.Float predictedValue)
MLModel
.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
- public Prediction withPredictedScores(java.util.Map<java.lang.String,java.lang.Float> predictedScores)
predictedScores
- public Prediction addPredictedScoresEntry(java.lang.String key, java.lang.Float value)
public Prediction clearPredictedScoresEntries()
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
- public Prediction withDetails(java.util.Map<java.lang.String,java.lang.String> details)
details
- public Prediction addDetailsEntry(java.lang.String key, java.lang.String value)
public Prediction clearDetailsEntries()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Prediction clone()
clone
in class java.lang.Object