Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Metric
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Metric
- 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 running evaluations.
Instance Attribute Summary collapse
-
#aggregation_metrics ⇒ Array<String>
Optional.
-
#bleu_spec ⇒ Google::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.
-
#custom_code_execution_spec ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CustomCodeExecutionSpec
Specificies a metric that is populated by evaluating user-defined Python code.
-
#exact_match_spec ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ExactMatchSpec
Spec for exact match metric - returns 1 if prediction and reference exactly matches, otherwise 0.
-
#llm_based_metric_spec ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1LlmBasedMetricSpec
Specification for an LLM based metric.
-
#pairwise_metric_spec ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PairwiseMetricSpec
Spec for pairwise metric.
-
#pointwise_metric_spec ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PointwiseMetricSpec
Spec for pointwise metric.
-
#predefined_metric_spec ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PredefinedMetricSpec
The spec for a pre-defined metric.
-
#rouge_spec ⇒ Google::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.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1Metric
constructor
A new instance of GoogleCloudAiplatformV1Metric.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1Metric
Returns a new instance of GoogleCloudAiplatformV1Metric.
20935 20936 20937 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 20935 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
20890 20891 20892 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 20890 def aggregation_metrics @aggregation_metrics end |
#bleu_spec ⇒ Google::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
20896 20897 20898 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 20896 def bleu_spec @bleu_spec end |
#custom_code_execution_spec ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CustomCodeExecutionSpec
Specificies a metric that is populated by evaluating user-defined Python code.
Corresponds to the JSON property customCodeExecutionSpec
20901 20902 20903 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 20901 def custom_code_execution_spec @custom_code_execution_spec end |
#exact_match_spec ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ExactMatchSpec
Spec for exact match metric - returns 1 if prediction and reference exactly
matches, otherwise 0.
Corresponds to the JSON property exactMatchSpec
20907 20908 20909 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 20907 def exact_match_spec @exact_match_spec end |
#llm_based_metric_spec ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1LlmBasedMetricSpec
Specification for an LLM based metric.
Corresponds to the JSON property llmBasedMetricSpec
20912 20913 20914 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 20912 def llm_based_metric_spec @llm_based_metric_spec end |
#pairwise_metric_spec ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PairwiseMetricSpec
Spec for pairwise metric.
Corresponds to the JSON property pairwiseMetricSpec
20917 20918 20919 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 20917 def pairwise_metric_spec @pairwise_metric_spec end |
#pointwise_metric_spec ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PointwiseMetricSpec
Spec for pointwise metric.
Corresponds to the JSON property pointwiseMetricSpec
20922 20923 20924 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 20922 def pointwise_metric_spec @pointwise_metric_spec end |
#predefined_metric_spec ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1PredefinedMetricSpec
The spec for a pre-defined metric.
Corresponds to the JSON property predefinedMetricSpec
20927 20928 20929 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 20927 def predefined_metric_spec @predefined_metric_spec end |
#rouge_spec ⇒ Google::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
20933 20934 20935 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 20933 def rouge_spec @rouge_spec end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
20940 20941 20942 20943 20944 20945 20946 20947 20948 20949 20950 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 20940 def update!(**args) @aggregation_metrics = args[:aggregation_metrics] if args.key?(:aggregation_metrics) @bleu_spec = args[:bleu_spec] if args.key?(:bleu_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) @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 |