Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class MetricSpec.
Represents a metric to optimize.
Generated from protobuf message google.cloud.aiplatform.v1.StudySpec.MetricSpec
Namespace
Google \ Cloud \ AIPlatform \ V1 \ StudySpecMethods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ metric_id |
string
Required. The ID of the metric. Must not contain whitespaces and must be unique amongst all MetricSpecs. |
↳ goal |
int
Required. The optimization goal of the metric. |
↳ safety_config |
MetricSpec\SafetyMetricConfig
Used for safe search. In the case, the metric will be a safety metric. You must provide a separate metric for objective metric. |
getMetricId
Required. The ID of the metric. Must not contain whitespaces and must be unique amongst all MetricSpecs.
| Returns | |
|---|---|
| Type | Description |
string |
|
setMetricId
Required. The ID of the metric. Must not contain whitespaces and must be unique amongst all MetricSpecs.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getGoal
Required. The optimization goal of the metric.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type GoalType. |
setGoal
Required. The optimization goal of the metric.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type GoalType. |
| Returns | |
|---|---|
| Type | Description |
$this |
|
getSafetyConfig
Used for safe search. In the case, the metric will be a safety metric. You must provide a separate metric for objective metric.
| Returns | |
|---|---|
| Type | Description |
MetricSpec\SafetyMetricConfig|null |
|
hasSafetyConfig
clearSafetyConfig
setSafetyConfig
Used for safe search. In the case, the metric will be a safety metric. You must provide a separate metric for objective metric.
| Parameter | |
|---|---|
| Name | Description |
var |
MetricSpec\SafetyMetricConfig
|
| Returns | |
|---|---|
| Type | Description |
$this |
|