Class: Google::Apis::LanguageV1::XpsTextSentimentEvaluationMetrics
- Inherits:
-
Object
- Object
- Google::Apis::LanguageV1::XpsTextSentimentEvaluationMetrics
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/language_v1/classes.rb,
lib/google/apis/language_v1/representations.rb,
lib/google/apis/language_v1/representations.rb
Overview
Model evaluation metrics for text sentiment problems.
Instance Attribute Summary collapse
-
#confusion_matrix ⇒ Google::Apis::LanguageV1::XpsConfusionMatrix
Confusion matrix of the model running the classification.
-
#f1_score ⇒ Float
Output only.
-
#linear_kappa ⇒ Float
Output only.
-
#mean_absolute_error ⇒ Float
Output only.
-
#mean_squared_error ⇒ Float
Output only.
-
#precision ⇒ Float
Output only.
-
#quadratic_kappa ⇒ Float
Output only.
-
#recall ⇒ Float
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ XpsTextSentimentEvaluationMetrics
constructor
A new instance of XpsTextSentimentEvaluationMetrics.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ XpsTextSentimentEvaluationMetrics
Returns a new instance of XpsTextSentimentEvaluationMetrics.
4469 4470 4471 |
# File 'lib/google/apis/language_v1/classes.rb', line 4469 def initialize(**args) update!(**args) end |
Instance Attribute Details
#confusion_matrix ⇒ Google::Apis::LanguageV1::XpsConfusionMatrix
Confusion matrix of the model running the classification.
Corresponds to the JSON property confusionMatrix
4428 4429 4430 |
# File 'lib/google/apis/language_v1/classes.rb', line 4428 def confusion_matrix @confusion_matrix end |
#f1_score ⇒ Float
Output only. The harmonic mean of recall and precision.
Corresponds to the JSON property f1Score
4433 4434 4435 |
# File 'lib/google/apis/language_v1/classes.rb', line 4433 def f1_score @f1_score end |
#linear_kappa ⇒ Float
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
4439 4440 4441 |
# File 'lib/google/apis/language_v1/classes.rb', line 4439 def linear_kappa @linear_kappa end |
#mean_absolute_error ⇒ Float
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
4445 4446 4447 |
# File 'lib/google/apis/language_v1/classes.rb', line 4445 def mean_absolute_error @mean_absolute_error end |
#mean_squared_error ⇒ Float
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
4451 4452 4453 |
# File 'lib/google/apis/language_v1/classes.rb', line 4451 def mean_squared_error @mean_squared_error end |
#precision ⇒ Float
Output only. Precision.
Corresponds to the JSON property precision
4456 4457 4458 |
# File 'lib/google/apis/language_v1/classes.rb', line 4456 def precision @precision end |
#quadratic_kappa ⇒ Float
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
4462 4463 4464 |
# File 'lib/google/apis/language_v1/classes.rb', line 4462 def quadratic_kappa @quadratic_kappa end |
#recall ⇒ Float
Output only. Recall.
Corresponds to the JSON property recall
4467 4468 4469 |
# File 'lib/google/apis/language_v1/classes.rb', line 4467 def recall @recall end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 |
# File 'lib/google/apis/language_v1/classes.rb', line 4474 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 |