Class: ModelFox::NormalizedFeatureContribution

Inherits:
Object
  • Object
show all
Defined in:
lib/modelfox/modelfox.rb

Overview

This describes the contribution of a feature from a normalized feature group.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(column_name:, feature_value:, feature_contribution_value:) ⇒ NormalizedFeatureContribution

Returns a new instance of NormalizedFeatureContribution.



126
127
128
129
130
# File 'lib/modelfox/modelfox.rb', line 126

def initialize(column_name:, feature_value:, feature_contribution_value:)
  @column_name = column_name
  @feature_value = feature_value
  @feature_contribution_value = feature_contribution_value
end

Instance Attribute Details

#column_nameObject (readonly)

This is the name of the source column for the feature group.



121
122
123
# File 'lib/modelfox/modelfox.rb', line 121

def column_name
  @column_name
end

#feature_contribution_valueObject (readonly)

This is the amount that the feature contributed to the output.



125
126
127
# File 'lib/modelfox/modelfox.rb', line 125

def feature_contribution_value
  @feature_contribution_value
end

#feature_valueObject (readonly)

This is the value of the feature.



123
124
125
# File 'lib/modelfox/modelfox.rb', line 123

def feature_value
  @feature_value
end