Class: HybridForest::Trees::MaxOneSplitPerFeature
- Inherits:
-
Object
- Object
- HybridForest::Trees::MaxOneSplitPerFeature
- Defined in:
- lib/hybridforest/trees/feature_selectors/max_one_split_per_feature.rb
Instance Attribute Summary collapse
-
#exhausted_features ⇒ Object
readonly
Returns the value of attribute exhausted_features.
Instance Method Summary collapse
-
#initialize ⇒ MaxOneSplitPerFeature
constructor
A new instance of MaxOneSplitPerFeature.
- #select_features(all_features) ⇒ Object
- #update(feature) ⇒ Object
Constructor Details
#initialize ⇒ MaxOneSplitPerFeature
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_features ⇒ Object (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 |