Class Prediction
- java.lang.Object
-
- com.amazonaws.services.machinelearning.model.Prediction
-
- All Implemented Interfaces:
Serializable,Cloneable
public class Prediction extends Object implements Serializable, Cloneable
The output from a
Predictoperation:-
Details- Contains the following attributes: DetailsAttributes.PREDICTIVE_MODEL_TYPE - REGRESSION | BINARY | MULTICLASS DetailsAttributes.ALGORITHM - SGD -
PredictedLabel- Present for either a BINARY or MULTICLASSMLModelrequest. -
PredictedScores- Contains the raw classification score corresponding to each label. -
PredictedValue- Present for a REGRESSIONMLModelrequest.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Prediction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PredictionaddDetailsEntry(String key, String value)PredictionaddPredictedScoresEntry(String key, Float value)PredictionclearDetailsEntries()Removes all the entries added into Details.PredictionclearPredictedScoresEntries()Removes all the entries added into PredictedScores.Predictionclone()booleanequals(Object obj)Map<String,String>getDetails()StringgetPredictedLabel()The prediction label for either a BINARY or MULTICLASSMLModel.Map<String,Float>getPredictedScores()FloatgetPredictedValue()The prediction value for REGRESSIONMLModel.inthashCode()voidsetDetails(Map<String,String> details)voidsetPredictedLabel(String predictedLabel)The prediction label for either a BINARY or MULTICLASSMLModel.voidsetPredictedScores(Map<String,Float> predictedScores)voidsetPredictedValue(Float predictedValue)The prediction value for REGRESSIONMLModel.StringtoString()Returns a string representation of this object; useful for testing and debugging.PredictionwithDetails(Map<String,String> details)PredictionwithPredictedLabel(String predictedLabel)The prediction label for either a BINARY or MULTICLASSMLModel.PredictionwithPredictedScores(Map<String,Float> predictedScores)PredictionwithPredictedValue(Float predictedValue)The prediction value for REGRESSIONMLModel.
-
-
-
Method Detail
-
setPredictedLabel
public void setPredictedLabel(String predictedLabel)
The prediction label for either a BINARY or MULTICLASSMLModel.- Parameters:
predictedLabel- The prediction label for either a BINARY or MULTICLASSMLModel.
-
getPredictedLabel
public String getPredictedLabel()
The prediction label for either a BINARY or MULTICLASSMLModel.- Returns:
- The prediction label for either a BINARY or MULTICLASS
MLModel.
-
withPredictedLabel
public Prediction withPredictedLabel(String predictedLabel)
The prediction label for either a BINARY or MULTICLASSMLModel.- Parameters:
predictedLabel- The prediction label for either a BINARY or MULTICLASSMLModel.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPredictedValue
public void setPredictedValue(Float predictedValue)
The prediction value for REGRESSIONMLModel.- Parameters:
predictedValue- The prediction value for REGRESSIONMLModel.
-
getPredictedValue
public Float getPredictedValue()
The prediction value for REGRESSIONMLModel.- Returns:
- The prediction value for REGRESSION
MLModel.
-
withPredictedValue
public Prediction withPredictedValue(Float predictedValue)
The prediction value for REGRESSIONMLModel.- Parameters:
predictedValue- The prediction value for REGRESSIONMLModel.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPredictedScores
public void setPredictedScores(Map<String,Float> predictedScores)
- Parameters:
predictedScores-
-
withPredictedScores
public Prediction withPredictedScores(Map<String,Float> predictedScores)
- Parameters:
predictedScores-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addPredictedScoresEntry
public Prediction addPredictedScoresEntry(String key, Float value)
-
clearPredictedScoresEntries
public Prediction clearPredictedScoresEntries()
Removes all the entries added into PredictedScores. <p> Returns a reference to this object so that method calls can be chained together.
-
withDetails
public Prediction withDetails(Map<String,String> details)
- Parameters:
details-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
addDetailsEntry
public Prediction addDetailsEntry(String key, String value)
-
clearDetailsEntries
public Prediction clearDetailsEntries()
Removes all the entries added into Details. <p> Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public Prediction clone()
-
-