Class: ModelFox::BagOfWordsCosineSimilarityFeatureContribution

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

Overview

This describes the contribution of a feature from a bag of words cosine similarity feature group.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(column_name_a:, column_name_b:, feature_contribution_value:, feature_value:) ⇒ BagOfWordsCosineSimilarityFeatureContribution

Returns a new instance of BagOfWordsCosineSimilarityFeatureContribution.



200
201
202
203
204
205
# File 'lib/modelfox/modelfox.rb', line 200

def initialize(column_name_a:, column_name_b:, feature_contribution_value:, feature_value:)
  @column_name_a = column_name_a
  @column_name_b = column_name_b
  @feature_contribution_value = feature_contribution_value
  @feature_value = feature_value
end

Instance Attribute Details

#column_name_aObject (readonly)

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



193
194
195
# File 'lib/modelfox/modelfox.rb', line 193

def column_name_a
  @column_name_a
end

#column_name_bObject (readonly)

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



195
196
197
# File 'lib/modelfox/modelfox.rb', line 195

def column_name_b
  @column_name_b
end

#feature_contribution_valueObject (readonly)

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



199
200
201
# File 'lib/modelfox/modelfox.rb', line 199

def feature_contribution_value
  @feature_contribution_value
end

#feature_valueObject (readonly)

This is the value of the feature.



197
198
199
# File 'lib/modelfox/modelfox.rb', line 197

def feature_value
  @feature_value
end