Class: Google::Apis::BigqueryV2::RegressionMetrics

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

Overview

Evaluation metrics for regression and explicit feedback type matrix factorization models.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ RegressionMetrics

Returns a new instance of RegressionMetrics.



5042
5043
5044
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5042

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

Instance Attribute Details

#mean_absolute_errorFloat

Mean absolute error. Corresponds to the JSON property meanAbsoluteError

Returns:

  • (Float)


5020
5021
5022
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5020

def mean_absolute_error
  @mean_absolute_error
end

#mean_squared_errorFloat

Mean squared error. Corresponds to the JSON property meanSquaredError

Returns:

  • (Float)


5025
5026
5027
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5025

def mean_squared_error
  @mean_squared_error
end

#mean_squared_log_errorFloat

Mean squared log error. Corresponds to the JSON property meanSquaredLogError

Returns:

  • (Float)


5030
5031
5032
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5030

def mean_squared_log_error
  @mean_squared_log_error
end

#median_absolute_errorFloat

Median absolute error. Corresponds to the JSON property medianAbsoluteError

Returns:

  • (Float)


5035
5036
5037
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5035

def median_absolute_error
  @median_absolute_error
end

#r_squaredFloat

R^2 score. Corresponds to the JSON property rSquared

Returns:

  • (Float)


5040
5041
5042
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5040

def r_squared
  @r_squared
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5047
5048
5049
5050
5051
5052
5053
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5047

def update!(**args)
  @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)
  @mean_squared_log_error = args[:mean_squared_log_error] if args.key?(:mean_squared_log_error)
  @median_absolute_error = args[:median_absolute_error] if args.key?(:median_absolute_error)
  @r_squared = args[:r_squared] if args.key?(:r_squared)
end