Class: Tangram::IdentityFeatureContribution

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

Overview

This describes the contribution of a feature from an identity feature group.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(column_name:, feature_contribution_value:, feature_value:) ⇒ IdentityFeatureContribution

Returns a new instance of IdentityFeatureContribution.



111
112
113
114
115
# File 'lib/tangram/tangram.rb', line 111

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



106
107
108
# File 'lib/tangram/tangram.rb', line 106

def column_name
  @column_name
end

#feature_contribution_valueObject (readonly)

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



110
111
112
# File 'lib/tangram/tangram.rb', line 110

def feature_contribution_value
  @feature_contribution_value
end

#feature_valueObject (readonly)

This is the value of the feature.



108
109
110
# File 'lib/tangram/tangram.rb', line 108

def feature_value
  @feature_value
end