Class: ModelFox::BagOfWordsFeatureContribution
- Inherits:
-
Object
- Object
- ModelFox::BagOfWordsFeatureContribution
- Defined in:
- lib/modelfox/modelfox.rb
Overview
This describes the contribution of a feature from a bag of words 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.
-
#feature_value ⇒ Object
readonly
This is the value of the feature.
-
#ngram ⇒ Object
readonly
This is the ngram for the feature.
Instance Method Summary collapse
-
#initialize(column_name:, ngram:, feature_contribution_value:, feature_value:) ⇒ BagOfWordsFeatureContribution
constructor
A new instance of BagOfWordsFeatureContribution.
Constructor Details
#initialize(column_name:, ngram:, feature_contribution_value:, feature_value:) ⇒ BagOfWordsFeatureContribution
Returns a new instance of BagOfWordsFeatureContribution.
161 162 163 164 165 166 |
# File 'lib/modelfox/modelfox.rb', line 161 def initialize(column_name:, ngram:, feature_contribution_value:, feature_value:) @column_name = column_name @ngram = ngram @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.
154 155 156 |
# File 'lib/modelfox/modelfox.rb', line 154 def column_name @column_name end |
#feature_contribution_value ⇒ Object (readonly)
This is the amount that the feature contributed to the output.
160 161 162 |
# File 'lib/modelfox/modelfox.rb', line 160 def feature_contribution_value @feature_contribution_value end |
#feature_value ⇒ Object (readonly)
This is the value of the feature.
158 159 160 |
# File 'lib/modelfox/modelfox.rb', line 158 def feature_value @feature_value end |
#ngram ⇒ Object (readonly)
This is the ngram for the feature.
156 157 158 |
# File 'lib/modelfox/modelfox.rb', line 156 def ngram @ngram end |