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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/bigquery_v2/classes.rb,
lib/google/apis/bigquery_v2/representations.rb,
lib/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

Constructor Details

#initialize(**args) ⇒ RegressionMetrics

Returns a new instance of RegressionMetrics.



7951
7952
7953
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7951

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

Instance Attribute Details

#mean_absolute_errorFloat

Mean absolute error. Corresponds to the JSON property meanAbsoluteError

Returns:

  • (Float)


7929
7930
7931
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7929

def mean_absolute_error
  @mean_absolute_error
end

#mean_squared_errorFloat

Mean squared error. Corresponds to the JSON property meanSquaredError

Returns:

  • (Float)


7934
7935
7936
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7934

def mean_squared_error
  @mean_squared_error
end

#mean_squared_log_errorFloat

Mean squared log error. Corresponds to the JSON property meanSquaredLogError

Returns:

  • (Float)


7939
7940
7941
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7939

def mean_squared_log_error
  @mean_squared_log_error
end

#median_absolute_errorFloat

Median absolute error. Corresponds to the JSON property medianAbsoluteError

Returns:

  • (Float)


7944
7945
7946
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7944

def median_absolute_error
  @median_absolute_error
end

#r_squaredFloat

R^2 score. This corresponds to r2_score in ML.EVALUATE. Corresponds to the JSON property rSquared

Returns:

  • (Float)


7949
7950
7951
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7949

def r_squared
  @r_squared
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7956
7957
7958
7959
7960
7961
7962
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7956

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