Class: Google::Apis::LanguageV2::XpsRegressionEvaluationMetrics

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

Overview

Model evaluation metrics for regression problems. It can be used for Tables.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ XpsRegressionEvaluationMetrics

Returns a new instance of XpsRegressionEvaluationMetrics.



2901
2902
2903
# File 'lib/google/apis/language_v2/classes.rb', line 2901

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

Instance Attribute Details

#mean_absolute_errorFloat

Mean Absolute Error (MAE). Corresponds to the JSON property meanAbsoluteError

Returns:

  • (Float)


2873
2874
2875
# File 'lib/google/apis/language_v2/classes.rb', line 2873

def mean_absolute_error
  @mean_absolute_error
end

#mean_absolute_percentage_errorFloat

Mean absolute percentage error. Only set if all ground truth values are positive. Corresponds to the JSON property meanAbsolutePercentageError

Returns:

  • (Float)


2879
2880
2881
# File 'lib/google/apis/language_v2/classes.rb', line 2879

def mean_absolute_percentage_error
  @mean_absolute_percentage_error
end

#r_squaredFloat

R squared. Corresponds to the JSON property rSquared

Returns:

  • (Float)


2884
2885
2886
# File 'lib/google/apis/language_v2/classes.rb', line 2884

def r_squared
  @r_squared
end

#regression_metrics_entriesArray<Google::Apis::LanguageV2::XpsRegressionMetricsEntry>

A list of actual versus predicted points for the model being evaluated. Corresponds to the JSON property regressionMetricsEntries



2889
2890
2891
# File 'lib/google/apis/language_v2/classes.rb', line 2889

def regression_metrics_entries
  @regression_metrics_entries
end

#root_mean_squared_errorFloat

Root Mean Squared Error (RMSE). Corresponds to the JSON property rootMeanSquaredError

Returns:

  • (Float)


2894
2895
2896
# File 'lib/google/apis/language_v2/classes.rb', line 2894

def root_mean_squared_error
  @root_mean_squared_error
end

#root_mean_squared_log_errorFloat

Root mean squared log error. Corresponds to the JSON property rootMeanSquaredLogError

Returns:

  • (Float)


2899
2900
2901
# File 'lib/google/apis/language_v2/classes.rb', line 2899

def root_mean_squared_log_error
  @root_mean_squared_log_error
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2906
2907
2908
2909
2910
2911
2912
2913
# File 'lib/google/apis/language_v2/classes.rb', line 2906

def update!(**args)
  @mean_absolute_error = args[:mean_absolute_error] if args.key?(:mean_absolute_error)
  @mean_absolute_percentage_error = args[:mean_absolute_percentage_error] if args.key?(:mean_absolute_percentage_error)
  @r_squared = args[:r_squared] if args.key?(:r_squared)
  @regression_metrics_entries = args[:regression_metrics_entries] if args.key?(:regression_metrics_entries)
  @root_mean_squared_error = args[:root_mean_squared_error] if args.key?(:root_mean_squared_error)
  @root_mean_squared_log_error = args[:root_mean_squared_log_error] if args.key?(:root_mean_squared_log_error)
end