Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Metric

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1/classes.rb,
lib/google/apis/aiplatform_v1/representations.rb,
lib/google/apis/aiplatform_v1/representations.rb

Overview

The metric used for dataset level evaluation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1Metric

Returns a new instance of GoogleCloudAiplatformV1Metric.



16057
16058
16059
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16057

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#aggregation_metricsArray<String>

Optional. The aggregation metrics to use. Corresponds to the JSON property aggregationMetrics

Returns:

  • (Array<String>)


16027
16028
16029
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16027

def aggregation_metrics
  @aggregation_metrics
end

#bleu_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1BleuSpec

Spec for bleu score metric - calculates the precision of n-grams in the prediction as compared to reference - returns a score ranging between 0 to 1. Corresponds to the JSON property bleuSpec



16033
16034
16035
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16033

def bleu_spec
  @bleu_spec
end

#exact_match_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1ExactMatchSpec

Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0. Corresponds to the JSON property exactMatchSpec



16039
16040
16041
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16039

def exact_match_spec
  @exact_match_spec
end

#pairwise_metric_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1PairwiseMetricSpec

Spec for pairwise metric. Corresponds to the JSON property pairwiseMetricSpec



16044
16045
16046
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16044

def pairwise_metric_spec
  @pairwise_metric_spec
end

#pointwise_metric_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1PointwiseMetricSpec

Spec for pointwise metric. Corresponds to the JSON property pointwiseMetricSpec



16049
16050
16051
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16049

def pointwise_metric_spec
  @pointwise_metric_spec
end

#rouge_specGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1RougeSpec

Spec for rouge score metric - calculates the recall of n-grams in prediction as compared to reference - returns a score ranging between 0 and 1. Corresponds to the JSON property rougeSpec



16055
16056
16057
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16055

def rouge_spec
  @rouge_spec
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



16062
16063
16064
16065
16066
16067
16068
16069
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 16062

def update!(**args)
  @aggregation_metrics = args[:aggregation_metrics] if args.key?(:aggregation_metrics)
  @bleu_spec = args[:bleu_spec] if args.key?(:bleu_spec)
  @exact_match_spec = args[:exact_match_spec] if args.key?(:exact_match_spec)
  @pairwise_metric_spec = args[:pairwise_metric_spec] if args.key?(:pairwise_metric_spec)
  @pointwise_metric_spec = args[:pointwise_metric_spec] if args.key?(:pointwise_metric_spec)
  @rouge_spec = args[:rouge_spec] if args.key?(:rouge_spec)
end