Class: Google::Apis::BigqueryV2::PrincipalComponentInfo

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

Principal component infos, used only for eigen decomposition based models, e.g. , PCA. Ordered by explained_variance in the descending order.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PrincipalComponentInfo

Returns a new instance of PrincipalComponentInfo.



7108
7109
7110
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7108

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

Instance Attribute Details

#cumulative_explained_variance_ratioFloat

The explained_variance is pre-ordered in the descending order to compute the cumulative explained variance ratio. Corresponds to the JSON property cumulativeExplainedVarianceRatio

Returns:

  • (Float)


7091
7092
7093
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7091

def cumulative_explained_variance_ratio
  @cumulative_explained_variance_ratio
end

#explained_varianceFloat

Explained variance by this principal component, which is simply the eigenvalue. Corresponds to the JSON property explainedVariance

Returns:

  • (Float)


7096
7097
7098
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7096

def explained_variance
  @explained_variance
end

#explained_variance_ratioFloat

Explained_variance over the total explained variance. Corresponds to the JSON property explainedVarianceRatio

Returns:

  • (Float)


7101
7102
7103
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7101

def explained_variance_ratio
  @explained_variance_ratio
end

#principal_component_idFixnum

Id of the principal component. Corresponds to the JSON property principalComponentId

Returns:

  • (Fixnum)


7106
7107
7108
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7106

def principal_component_id
  @principal_component_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7113
7114
7115
7116
7117
7118
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7113

def update!(**args)
  @cumulative_explained_variance_ratio = args[:cumulative_explained_variance_ratio] if args.key?(:cumulative_explained_variance_ratio)
  @explained_variance = args[:explained_variance] if args.key?(:explained_variance)
  @explained_variance_ratio = args[:explained_variance_ratio] if args.key?(:explained_variance_ratio)
  @principal_component_id = args[:principal_component_id] if args.key?(:principal_component_id)
end