com.amazonaws.services.machinelearning.model

## 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 `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.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`Prediction()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Prediction` `addDetailsEntry(String key, String value)`
`Prediction` `addPredictedScoresEntry(String key, Float value)`
`Prediction` `clearDetailsEntries()` Removes all the entries added into Details.
`Prediction` `clearPredictedScoresEntries()` Removes all the entries added into PredictedScores.
`Prediction` `clone()`
`boolean` `equals(Object obj)`
`Map<String,String>` `getDetails()`
`String` `getPredictedLabel()` The prediction label for either a `BINARY` or `MULTICLASS` `MLModel`.
`Map<String,Float>` `getPredictedScores()`
`Float` `getPredictedValue()` The prediction value for `REGRESSION` `MLModel`.
`int` `hashCode()`
`void` `setDetails(Map<String,String> details)`
`void` `setPredictedLabel(String predictedLabel)` The prediction label for either a `BINARY` or `MULTICLASS` `MLModel`.
`void` `setPredictedScores(Map<String,Float> predictedScores)`
`void` `setPredictedValue(Float predictedValue)` The prediction value for `REGRESSION` `MLModel`.
`String` `toString()` Returns a string representation of this object; useful for testing and debugging.
`Prediction` `withDetails(Map<String,String> details)`
`Prediction` `withPredictedLabel(String predictedLabel)` The prediction label for either a `BINARY` or `MULTICLASS` `MLModel`.
`Prediction` `withPredictedScores(Map<String,Float> predictedScores)`
`Prediction` `withPredictedValue(Float predictedValue)` The prediction value for `REGRESSION` `MLModel`.

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### Prediction

    public Prediction()

### Method Detail

#### setPredictedLabel

    public void setPredictedLabel(String predictedLabel)

The prediction label for either a `BINARY` or `MULTICLASS` `MLModel`.

Parameters:
  `predictedLabel` - The prediction label for either a `BINARY` or `MULTICLASS` `MLModel`.

#### getPredictedLabel

    public String getPredictedLabel()

The prediction label for either a `BINARY` or `MULTICLASS` `MLModel`.

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 `MULTICLASS` `MLModel`.

Parameters:
  `predictedLabel` - The prediction label for either a `BINARY` or `MULTICLASS` `MLModel`.
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 `REGRESSION` `MLModel`.

Parameters:
  `predictedValue` - The prediction value for `REGRESSION` `MLModel`.

#### getPredictedValue

    public Float getPredictedValue()

The prediction value for `REGRESSION` `MLModel`.

Returns:
  The prediction value for `REGRESSION` `MLModel`.

#### withPredictedValue

    public Prediction withPredictedValue(Float predictedValue)

The prediction value for `REGRESSION` `MLModel`.

Parameters:
  `predictedValue` - The prediction value for `REGRESSION` `MLModel`.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### getPredictedScores

    public Map<String,Float> getPredictedScores()

Returns:

#### 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.

Returns:
  Returns a reference to this object so that method calls can be chained together.

#### getDetails

    public Map<String,String> getDetails()

Returns:

#### setDetails

    public void setDetails(Map<String,String> details)

Parameters:
  `details` -

#### 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.

Returns:
  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:
  `toString` in class `Object`
Returns:
  A string representation of this object.
See Also:
  `Object.toString()`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### clone

    public Prediction clone()

Overrides:
  `clone` in class `Object`