Class: HybridForest::Trees::MaxOneSplitPerFeature

Inherits:
Object
  • Object
show all
Defined in:
lib/hybridforest/trees/feature_selectors/max_one_split_per_feature.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMaxOneSplitPerFeature

Returns a new instance of MaxOneSplitPerFeature.



8
9
10
# File 'lib/hybridforest/trees/feature_selectors/max_one_split_per_feature.rb', line 8

def initialize
  @exhausted_features = []
end

Instance Attribute Details

#exhausted_featuresObject (readonly)

Returns the value of attribute exhausted_features.



6
7
8
# File 'lib/hybridforest/trees/feature_selectors/max_one_split_per_feature.rb', line 6

def exhausted_features
  @exhausted_features
end

Instance Method Details

#select_features(all_features) ⇒ Object



12
13
14
# File 'lib/hybridforest/trees/feature_selectors/max_one_split_per_feature.rb', line 12

def select_features(all_features)
  all_features - @exhausted_features
end

#update(feature) ⇒ Object



16
17
18
# File 'lib/hybridforest/trees/feature_selectors/max_one_split_per_feature.rb', line 16

def update(feature)
  @exhausted_features << feature
end