Google Cloud Ai Platform V1 Client - Class Metric (1.57.0)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class Metric.

The metric used for running evaluations.

Generated from protobuf message google.cloud.aiplatform.v1.Metric

Namespace

Google \ Cloud \ AIPlatform \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ predefined_metric_spec PredefinedMetricSpec

The spec for a pre-defined metric.

↳ computation_based_metric_spec ComputationBasedMetricSpec

Spec for a computation based metric.

↳ llm_based_metric_spec LLMBasedMetricSpec

Spec for an LLM based metric.

↳ pointwise_metric_spec PointwiseMetricSpec

Spec for pointwise metric.

↳ pairwise_metric_spec PairwiseMetricSpec

Spec for pairwise metric.

↳ exact_match_spec ExactMatchSpec

Spec for exact match metric.

↳ bleu_spec BleuSpec

Spec for bleu metric.

↳ rouge_spec RougeSpec

Spec for rouge metric.

↳ aggregation_metrics int[]

Optional. The aggregation metrics to use.

getPredefinedMetricSpec

The spec for a pre-defined metric.

Returns
Type Description
PredefinedMetricSpec|null

hasPredefinedMetricSpec

setPredefinedMetricSpec

The spec for a pre-defined metric.

Parameter
Name Description
var PredefinedMetricSpec
Returns
Type Description
$this

getComputationBasedMetricSpec

Spec for a computation based metric.

Returns
Type Description
ComputationBasedMetricSpec|null

hasComputationBasedMetricSpec

setComputationBasedMetricSpec

Spec for a computation based metric.

Parameter
Name Description
var ComputationBasedMetricSpec
Returns
Type Description
$this

getLlmBasedMetricSpec

Spec for an LLM based metric.

Returns
Type Description
LLMBasedMetricSpec|null

hasLlmBasedMetricSpec

setLlmBasedMetricSpec

Spec for an LLM based metric.

Parameter
Name Description
var LLMBasedMetricSpec
Returns
Type Description
$this

getPointwiseMetricSpec

Spec for pointwise metric.

Returns
Type Description
PointwiseMetricSpec|null

hasPointwiseMetricSpec

setPointwiseMetricSpec

Spec for pointwise metric.

Parameter
Name Description
var PointwiseMetricSpec
Returns
Type Description
$this

getPairwiseMetricSpec

Spec for pairwise metric.

Returns
Type Description
PairwiseMetricSpec|null

hasPairwiseMetricSpec

setPairwiseMetricSpec

Spec for pairwise metric.

Parameter
Name Description
var PairwiseMetricSpec
Returns
Type Description
$this

getExactMatchSpec

Spec for exact match metric.

Returns
Type Description
ExactMatchSpec|null

hasExactMatchSpec

setExactMatchSpec

Spec for exact match metric.

Parameter
Name Description
var ExactMatchSpec
Returns
Type Description
$this

getBleuSpec

Spec for bleu metric.

Returns
Type Description
BleuSpec|null

hasBleuSpec

setBleuSpec

Spec for bleu metric.

Parameter
Name Description
var BleuSpec
Returns
Type Description
$this

getRougeSpec

Spec for rouge metric.

Returns
Type Description
RougeSpec|null

hasRougeSpec

setRougeSpec

Spec for rouge metric.

Parameter
Name Description
var RougeSpec
Returns
Type Description
$this

getAggregationMetrics

Optional. The aggregation metrics to use.

Returns
Type Description
Google\Protobuf\RepeatedField<int>

setAggregationMetrics

Optional. The aggregation metrics to use.

Parameter
Name Description
var int[]
Returns
Type Description
$this

getMetricSpec

Returns
Type Description
string