Class: ModelFox::WordEmbeddingFeatureContribution

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

Overview

This describes the contribution of a feature from a word embedding feature group.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(column_name:, value_index:, feature_contribution_value:) ⇒ WordEmbeddingFeatureContribution

Returns a new instance of WordEmbeddingFeatureContribution.



216
217
218
219
220
# File 'lib/modelfox/modelfox.rb', line 216

def initialize(column_name:, value_index:, feature_contribution_value:)
  @column_name = column_name
  @value_index = value_index
  @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.



211
212
213
# File 'lib/modelfox/modelfox.rb', line 211

def column_name
  @column_name
end

#feature_contribution_valueObject (readonly)

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



215
216
217
# File 'lib/modelfox/modelfox.rb', line 215

def feature_contribution_value
  @feature_contribution_value
end

#value_indexObject (readonly)

This is the index of the feature in the word embedding.



213
214
215
# File 'lib/modelfox/modelfox.rb', line 213

def value_index
  @value_index
end