Class: Tangram::BagOfWordsCosineSimilarityFeatureContribution

Inherits:
Object
  • Object
show all
Defined in:
lib/tangram/tangram.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/tangram/tangram.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/tangram/tangram.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/tangram/tangram.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/tangram/tangram.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/tangram/tangram.rb', line 197

def feature_value
  @feature_value
end