Class: Google::Apis::LanguageV1beta2::XpsTextSentimentEvaluationMetrics

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

Overview

Model evaluation metrics for text sentiment problems.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ XpsTextSentimentEvaluationMetrics

Returns a new instance of XpsTextSentimentEvaluationMetrics.



4489
4490
4491
# File 'lib/google/apis/language_v1beta2/classes.rb', line 4489

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

Instance Attribute Details

#confusion_matrixGoogle::Apis::LanguageV1beta2::XpsConfusionMatrix

Confusion matrix of the model running the classification. Corresponds to the JSON property confusionMatrix



4448
4449
4450
# File 'lib/google/apis/language_v1beta2/classes.rb', line 4448

def confusion_matrix
  @confusion_matrix
end

#f1_scoreFloat

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

Returns:

  • (Float)


4453
4454
4455
# File 'lib/google/apis/language_v1beta2/classes.rb', line 4453

def f1_score
  @f1_score
end

#linear_kappaFloat

Output only. Linear weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec. Corresponds to the JSON property linearKappa

Returns:

  • (Float)


4459
4460
4461
# File 'lib/google/apis/language_v1beta2/classes.rb', line 4459

def linear_kappa
  @linear_kappa
end

#mean_absolute_errorFloat

Output only. Mean absolute error. Only set for the overall model evaluation, not for evaluation of a single annotation spec. Corresponds to the JSON property meanAbsoluteError

Returns:

  • (Float)


4465
4466
4467
# File 'lib/google/apis/language_v1beta2/classes.rb', line 4465

def mean_absolute_error
  @mean_absolute_error
end

#mean_squared_errorFloat

Output only. Mean squared error. Only set for the overall model evaluation, not for evaluation of a single annotation spec. Corresponds to the JSON property meanSquaredError

Returns:

  • (Float)


4471
4472
4473
# File 'lib/google/apis/language_v1beta2/classes.rb', line 4471

def mean_squared_error
  @mean_squared_error
end

#precisionFloat

Output only. Precision. Corresponds to the JSON property precision

Returns:

  • (Float)


4476
4477
4478
# File 'lib/google/apis/language_v1beta2/classes.rb', line 4476

def precision
  @precision
end

#quadratic_kappaFloat

Output only. Quadratic weighted kappa. Only set for the overall model evaluation, not for evaluation of a single annotation spec. Corresponds to the JSON property quadraticKappa

Returns:

  • (Float)


4482
4483
4484
# File 'lib/google/apis/language_v1beta2/classes.rb', line 4482

def quadratic_kappa
  @quadratic_kappa
end

#recallFloat

Output only. Recall. Corresponds to the JSON property recall

Returns:

  • (Float)


4487
4488
4489
# File 'lib/google/apis/language_v1beta2/classes.rb', line 4487

def recall
  @recall
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
# File 'lib/google/apis/language_v1beta2/classes.rb', line 4494

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