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.
31309 31310 31311 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31309 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
31254 31255 31256 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31254 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
31260 31261 31262 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31260 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
31265 31266 31267 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31265 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
31270 31271 31272 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31270 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
31276 31277 31278 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31276 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
31281 31282 31283 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31281 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
31286 31287 31288 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31286 def @metadata end |
#pairwise_metric_spec ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1PairwiseMetricSpec
Spec for pairwise metric.
Corresponds to the JSON property pairwiseMetricSpec
31291 31292 31293 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31291 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
31296 31297 31298 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31296 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
31301 31302 31303 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31301 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
31307 31308 31309 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31307 def rouge_spec @rouge_spec end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
31314 31315 31316 31317 31318 31319 31320 31321 31322 31323 31324 31325 31326 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 31314 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 |