/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SageMaker { namespace Model { /** *

Defines the objective metric for a hyperparameter tuning job. Hyperparameter * tuning uses the value of this metric to evaluate the training jobs it launches, * and returns the training job that results in either the highest or lowest value * for this metric, depending on the value you specify for the Type * parameter.

See Also:

AWS * API Reference

*/ class HyperParameterTuningJobObjective { public: AWS_SAGEMAKER_API HyperParameterTuningJobObjective(); AWS_SAGEMAKER_API HyperParameterTuningJobObjective(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API HyperParameterTuningJobObjective& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Whether to minimize or maximize the objective metric.

*/ inline const HyperParameterTuningJobObjectiveType& GetType() const{ return m_type; } /** *

Whether to minimize or maximize the objective metric.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

Whether to minimize or maximize the objective metric.

*/ inline void SetType(const HyperParameterTuningJobObjectiveType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

Whether to minimize or maximize the objective metric.

*/ inline void SetType(HyperParameterTuningJobObjectiveType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

Whether to minimize or maximize the objective metric.

*/ inline HyperParameterTuningJobObjective& WithType(const HyperParameterTuningJobObjectiveType& value) { SetType(value); return *this;} /** *

Whether to minimize or maximize the objective metric.

*/ inline HyperParameterTuningJobObjective& WithType(HyperParameterTuningJobObjectiveType&& value) { SetType(std::move(value)); return *this;} /** *

The name of the metric to use for the objective metric.

*/ inline const Aws::String& GetMetricName() const{ return m_metricName; } /** *

The name of the metric to use for the objective metric.

*/ inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; } /** *

The name of the metric to use for the objective metric.

*/ inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; } /** *

The name of the metric to use for the objective metric.

*/ inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); } /** *

The name of the metric to use for the objective metric.

*/ inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); } /** *

The name of the metric to use for the objective metric.

*/ inline HyperParameterTuningJobObjective& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;} /** *

The name of the metric to use for the objective metric.

*/ inline HyperParameterTuningJobObjective& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;} /** *

The name of the metric to use for the objective metric.

*/ inline HyperParameterTuningJobObjective& WithMetricName(const char* value) { SetMetricName(value); return *this;} private: HyperParameterTuningJobObjectiveType m_type; bool m_typeHasBeenSet = false; Aws::String m_metricName; bool m_metricNameHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws