/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace MachineLearning
{
namespace Model
{
/**
* 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:
AWS
* API Reference
*/
class Prediction
{
public:
AWS_MACHINELEARNING_API Prediction();
AWS_MACHINELEARNING_API Prediction(Aws::Utils::Json::JsonView jsonValue);
AWS_MACHINELEARNING_API Prediction& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_MACHINELEARNING_API Aws::Utils::Json::JsonValue Jsonize() const;
/**
* The prediction label for either a BINARY
or
* MULTICLASS
MLModel
.
*/
inline const Aws::String& GetPredictedLabel() const{ return m_predictedLabel; }
/**
* The prediction label for either a BINARY
or
* MULTICLASS
MLModel
.
*/
inline bool PredictedLabelHasBeenSet() const { return m_predictedLabelHasBeenSet; }
/**
* The prediction label for either a BINARY
or
* MULTICLASS
MLModel
.
*/
inline void SetPredictedLabel(const Aws::String& value) { m_predictedLabelHasBeenSet = true; m_predictedLabel = value; }
/**
* The prediction label for either a BINARY
or
* MULTICLASS
MLModel
.
*/
inline void SetPredictedLabel(Aws::String&& value) { m_predictedLabelHasBeenSet = true; m_predictedLabel = std::move(value); }
/**
* The prediction label for either a BINARY
or
* MULTICLASS
MLModel
.
*/
inline void SetPredictedLabel(const char* value) { m_predictedLabelHasBeenSet = true; m_predictedLabel.assign(value); }
/**
* The prediction label for either a BINARY
or
* MULTICLASS
MLModel
.
*/
inline Prediction& WithPredictedLabel(const Aws::String& value) { SetPredictedLabel(value); return *this;}
/**
* The prediction label for either a BINARY
or
* MULTICLASS
MLModel
.
*/
inline Prediction& WithPredictedLabel(Aws::String&& value) { SetPredictedLabel(std::move(value)); return *this;}
/**
* The prediction label for either a BINARY
or
* MULTICLASS
MLModel
.
*/
inline Prediction& WithPredictedLabel(const char* value) { SetPredictedLabel(value); return *this;}
/**
* The prediction value for REGRESSION
MLModel
.
*/
inline double GetPredictedValue() const{ return m_predictedValue; }
/**
* The prediction value for REGRESSION
MLModel
.
*/
inline bool PredictedValueHasBeenSet() const { return m_predictedValueHasBeenSet; }
/**
* The prediction value for REGRESSION
MLModel
.
*/
inline void SetPredictedValue(double value) { m_predictedValueHasBeenSet = true; m_predictedValue = value; }
/**
* The prediction value for REGRESSION
MLModel
.
*/
inline Prediction& WithPredictedValue(double value) { SetPredictedValue(value); return *this;}
inline const Aws::Map& GetPredictedScores() const{ return m_predictedScores; }
inline bool PredictedScoresHasBeenSet() const { return m_predictedScoresHasBeenSet; }
inline void SetPredictedScores(const Aws::Map& value) { m_predictedScoresHasBeenSet = true; m_predictedScores = value; }
inline void SetPredictedScores(Aws::Map&& value) { m_predictedScoresHasBeenSet = true; m_predictedScores = std::move(value); }
inline Prediction& WithPredictedScores(const Aws::Map& value) { SetPredictedScores(value); return *this;}
inline Prediction& WithPredictedScores(Aws::Map&& value) { SetPredictedScores(std::move(value)); return *this;}
inline Prediction& AddPredictedScores(const Aws::String& key, double value) { m_predictedScoresHasBeenSet = true; m_predictedScores.emplace(key, value); return *this; }
inline Prediction& AddPredictedScores(Aws::String&& key, double value) { m_predictedScoresHasBeenSet = true; m_predictedScores.emplace(std::move(key), value); return *this; }
inline Prediction& AddPredictedScores(const char* key, double value) { m_predictedScoresHasBeenSet = true; m_predictedScores.emplace(key, value); return *this; }
inline const Aws::Map& GetDetails() const{ return m_details; }
inline bool DetailsHasBeenSet() const { return m_detailsHasBeenSet; }
inline void SetDetails(const Aws::Map& value) { m_detailsHasBeenSet = true; m_details = value; }
inline void SetDetails(Aws::Map&& value) { m_detailsHasBeenSet = true; m_details = std::move(value); }
inline Prediction& WithDetails(const Aws::Map& value) { SetDetails(value); return *this;}
inline Prediction& WithDetails(Aws::Map&& value) { SetDetails(std::move(value)); return *this;}
inline Prediction& AddDetails(const DetailsAttributes& key, const Aws::String& value) { m_detailsHasBeenSet = true; m_details.emplace(key, value); return *this; }
inline Prediction& AddDetails(DetailsAttributes&& key, const Aws::String& value) { m_detailsHasBeenSet = true; m_details.emplace(std::move(key), value); return *this; }
inline Prediction& AddDetails(const DetailsAttributes& key, Aws::String&& value) { m_detailsHasBeenSet = true; m_details.emplace(key, std::move(value)); return *this; }
inline Prediction& AddDetails(DetailsAttributes&& key, Aws::String&& value) { m_detailsHasBeenSet = true; m_details.emplace(std::move(key), std::move(value)); return *this; }
inline Prediction& AddDetails(DetailsAttributes&& key, const char* value) { m_detailsHasBeenSet = true; m_details.emplace(std::move(key), value); return *this; }
inline Prediction& AddDetails(const DetailsAttributes& key, const char* value) { m_detailsHasBeenSet = true; m_details.emplace(key, value); return *this; }
private:
Aws::String m_predictedLabel;
bool m_predictedLabelHasBeenSet = false;
double m_predictedValue;
bool m_predictedValueHasBeenSet = false;
Aws::Map m_predictedScores;
bool m_predictedScoresHasBeenSet = false;
Aws::Map m_details;
bool m_detailsHasBeenSet = false;
};
} // namespace Model
} // namespace MachineLearning
} // namespace Aws