Class: ModelFox::OneHotEncodedFeatureContribution
- Inherits:
-
Object
- Object
- ModelFox::OneHotEncodedFeatureContribution
- Defined in:
- lib/modelfox/modelfox.rb
Overview
This describes the contribution of a feature from a one hot encoded feature group.
Instance Attribute Summary collapse
-
#column_name ⇒ Object
readonly
This is the name of the source column for the feature group.
-
#feature_contribution_value ⇒ Object
readonly
This is the amount that the feature contributed to the output.b.
-
#feature_value ⇒ Object
readonly
This is the value of the feature.
-
#variant ⇒ Object
readonly
This is the enum variant the feature indicates the presence of.
Instance Method Summary collapse
-
#initialize(column_name:, variant:, feature_contribution_value:, feature_value:) ⇒ OneHotEncodedFeatureContribution
constructor
A new instance of OneHotEncodedFeatureContribution.
Constructor Details
#initialize(column_name:, variant:, feature_contribution_value:, feature_value:) ⇒ OneHotEncodedFeatureContribution
Returns a new instance of OneHotEncodedFeatureContribution.
143 144 145 146 147 148 |
# File 'lib/modelfox/modelfox.rb', line 143 def initialize(column_name:, variant:, feature_contribution_value:, feature_value:) @column_name = column_name @variant = variant @feature_contribution_value = feature_contribution_value @feature_value = feature_value end |
Instance Attribute Details
#column_name ⇒ Object (readonly)
This is the name of the source column for the feature group.
136 137 138 |
# File 'lib/modelfox/modelfox.rb', line 136 def column_name @column_name end |
#feature_contribution_value ⇒ Object (readonly)
This is the amount that the feature contributed to the output.b
142 143 144 |
# File 'lib/modelfox/modelfox.rb', line 142 def feature_contribution_value @feature_contribution_value end |
#feature_value ⇒ Object (readonly)
This is the value of the feature.
140 141 142 |
# File 'lib/modelfox/modelfox.rb', line 140 def feature_value @feature_value end |
#variant ⇒ Object (readonly)
This is the enum variant the feature indicates the presence of.
138 139 140 |
# File 'lib/modelfox/modelfox.rb', line 138 def variant @variant end |