NiklasPfister / adaXT

adaXT: tree-based machine learning in Python
https://niklaspfister.github.io/adaXT/
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

Fix feature indices #43

Closed WilliamHeuser closed 8 months ago

WilliamHeuser commented 8 months ago

This PR removes the feature_indices from the .fit() function of a DecisionTree, and instead implements max_features where a subset, of size max_features, from the features are chosen at random for each split.

I profiled this and saw that the __get_feature_indices() method I implemented to help implement max_features ran for 2 milliseconds in a run of about 7500 milliseconds. Thus the time spent doing this is miniscule. I don't think that it is a problem for us with this added running time.

NiklasPfister commented 8 months ago

@svbrodersen: Once/if you agree with the changes (in particular the comment you had) you can merge this.