Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Metric
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Metric
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb
Overview
The metric used for running evaluations.
Instance Attribute Summary collapse
-
#aggregation_metrics ⇒ Array<String>
Optional.
-
#bleu_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1BleuSpec
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.
-
#computation_based_metric_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ComputationBasedMetricSpec
Specification for a computation based metric.
-
#custom_code_execution_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1CustomCodeExecutionSpec
Specificies a metric that is populated by evaluating user-defined Python code.
-
#exact_match_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ExactMatchSpec
Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0.
-
#llm_based_metric_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1LlmBasedMetricSpec
Specification for an LLM based metric.
-
#metadata ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1MetricMetadata
Metadata about the metric, used for visualization and organization.
-
#pairwise_metric_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PairwiseMetricSpec
Spec for pairwise metric.
-
#pointwise_metric_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PointwiseMetricSpec
Spec for pointwise metric.
-
#predefined_metric_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PredefinedMetricSpec
The spec for a pre-defined metric.
-
#rouge_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1RougeSpec
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.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1Metric
constructor
A new instance of GoogleCloudAiplatformV1beta1Metric.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1Metric
Returns a new instance of GoogleCloudAiplatformV1beta1Metric.
33286 33287 33288 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33286 def initialize(**args) update!(**args) end |
Instance Attribute Details
#aggregation_metrics ⇒ Array<String>
Optional. The aggregation metrics to use.
Corresponds to the JSON property aggregationMetrics
33231 33232 33233 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33231 def aggregation_metrics @aggregation_metrics end |
#bleu_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1BleuSpec
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
33237 33238 33239 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33237 def bleu_spec @bleu_spec end |
#computation_based_metric_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ComputationBasedMetricSpec
Specification for a computation based metric.
Corresponds to the JSON property computationBasedMetricSpec
33242 33243 33244 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33242 def computation_based_metric_spec @computation_based_metric_spec end |
#custom_code_execution_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1CustomCodeExecutionSpec
Specificies a metric that is populated by evaluating user-defined Python code.
Corresponds to the JSON property customCodeExecutionSpec
33247 33248 33249 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33247 def custom_code_execution_spec @custom_code_execution_spec end |
#exact_match_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ExactMatchSpec
Spec for exact match metric - returns 1 if prediction and reference exactly
matches, otherwise 0.
Corresponds to the JSON property exactMatchSpec
33253 33254 33255 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33253 def exact_match_spec @exact_match_spec end |
#llm_based_metric_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1LlmBasedMetricSpec
Specification for an LLM based metric.
Corresponds to the JSON property llmBasedMetricSpec
33258 33259 33260 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33258 def llm_based_metric_spec @llm_based_metric_spec end |
#metadata ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1MetricMetadata
Metadata about the metric, used for visualization and organization.
Corresponds to the JSON property metadata
33263 33264 33265 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33263 def @metadata end |
#pairwise_metric_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PairwiseMetricSpec
Spec for pairwise metric.
Corresponds to the JSON property pairwiseMetricSpec
33268 33269 33270 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33268 def pairwise_metric_spec @pairwise_metric_spec end |
#pointwise_metric_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PointwiseMetricSpec
Spec for pointwise metric.
Corresponds to the JSON property pointwiseMetricSpec
33273 33274 33275 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33273 def pointwise_metric_spec @pointwise_metric_spec end |
#predefined_metric_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PredefinedMetricSpec
The spec for a pre-defined metric.
Corresponds to the JSON property predefinedMetricSpec
33278 33279 33280 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33278 def predefined_metric_spec @predefined_metric_spec end |
#rouge_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1RougeSpec
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
33284 33285 33286 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33284 def rouge_spec @rouge_spec end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
33291 33292 33293 33294 33295 33296 33297 33298 33299 33300 33301 33302 33303 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 33291 def update!(**args) @aggregation_metrics = args[:aggregation_metrics] if args.key?(:aggregation_metrics) @bleu_spec = args[:bleu_spec] if args.key?(:bleu_spec) @computation_based_metric_spec = args[:computation_based_metric_spec] if args.key?(:computation_based_metric_spec) @custom_code_execution_spec = args[:custom_code_execution_spec] if args.key?(:custom_code_execution_spec) @exact_match_spec = args[:exact_match_spec] if args.key?(:exact_match_spec) @llm_based_metric_spec = args[:llm_based_metric_spec] if args.key?(:llm_based_metric_spec) @metadata = args[:metadata] if args.key?(:metadata) @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) @predefined_metric_spec = args[:predefined_metric_spec] if args.key?(:predefined_metric_spec) @rouge_spec = args[:rouge_spec] if args.key?(:rouge_spec) end |