Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsTextSentimentEvaluationMetrics

Inherits:
Object
  • Object
show all
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

Model evaluation metrics for text sentiment problems.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsTextSentimentEvaluationMetrics

Returns a new instance of GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsTextSentimentEvaluationMetrics.



20256
20257
20258
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 20256

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

Instance Attribute Details

#confusion_matrixGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1SchemaModelevaluationMetricsConfusionMatrix

Confusion matrix of the evaluation. Only set for ModelEvaluations, not for ModelEvaluationSlices. Corresponds to the JSON property confusionMatrix



20215
20216
20217
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 20215

def confusion_matrix
  @confusion_matrix
end

#f1_scoreFloat

The harmonic mean of recall and precision. Corresponds to the JSON property f1Score

Returns:

  • (Float)


20220
20221
20222
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 20220

def f1_score
  @f1_score
end

#linear_kappaFloat

Linear weighted kappa. Only set for ModelEvaluations, not for ModelEvaluationSlices. Corresponds to the JSON property linearKappa

Returns:

  • (Float)


20226
20227
20228
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 20226

def linear_kappa
  @linear_kappa
end

#mean_absolute_errorFloat

Mean absolute error. Only set for ModelEvaluations, not for ModelEvaluationSlices. Corresponds to the JSON property meanAbsoluteError

Returns:

  • (Float)


20232
20233
20234
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 20232

def mean_absolute_error
  @mean_absolute_error
end

#mean_squared_errorFloat

Mean squared error. Only set for ModelEvaluations, not for ModelEvaluationSlices. Corresponds to the JSON property meanSquaredError

Returns:

  • (Float)


20238
20239
20240
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 20238

def mean_squared_error
  @mean_squared_error
end

#precisionFloat

Precision. Corresponds to the JSON property precision

Returns:

  • (Float)


20243
20244
20245
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 20243

def precision
  @precision
end

#quadratic_kappaFloat

Quadratic weighted kappa. Only set for ModelEvaluations, not for ModelEvaluationSlices. Corresponds to the JSON property quadraticKappa

Returns:

  • (Float)


20249
20250
20251
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 20249

def quadratic_kappa
  @quadratic_kappa
end

#recallFloat

Recall. Corresponds to the JSON property recall

Returns:

  • (Float)


20254
20255
20256
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 20254

def recall
  @recall
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 20261

def update!(**args)
  @confusion_matrix = args[:confusion_matrix] if args.key?(:confusion_matrix)
  @f1_score = args[:f1_score] if args.key?(:f1_score)
  @linear_kappa = args[:linear_kappa] if args.key?(:linear_kappa)
  @mean_absolute_error = args[:mean_absolute_error] if args.key?(:mean_absolute_error)
  @mean_squared_error = args[:mean_squared_error] if args.key?(:mean_squared_error)
  @precision = args[:precision] if args.key?(:precision)
  @quadratic_kappa = args[:quadratic_kappa] if args.key?(:quadratic_kappa)
  @recall = args[:recall] if args.key?(:recall)
end