Skip to content

extratrees: Learning decision tree ensembles #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

jonnor
Copy link
Contributor

@jonnor jonnor commented Jul 8, 2025

Here is an initial proof of concept that appears to be working on a few datasets. For 6k samples dataset and 5 trees, training times in order of 15-60 seconds on ESP32-S3. The subsampling factor influences this a lot.
The code needs a proper review and probably some cleaning, and then more testing. Doing some basic profiling would also be useful.

The constructor needs a keyword argument variant, to make code more sane. Right now there are like 11 positional args...

@jonnor
Copy link
Contributor Author

jonnor commented Jul 13, 2025

Other things that need fixing

  • Remove 256 large stack allocations for left/right
  • Add a way to monitor the training process. Probably on a per-tree level. Need a train_step type C function. Maybe a generator on Python side, as a convenience function
  • Fix hardcoded stack_size
  • Actually use randomized threshold selection. Right now there is logic more akin to RandomTrees, but with hardcoded 50 unique values (seemingly computed without random sampling). Goes through all samples - probably a major speedup if/when fixed.
  • Missing check on n_samples wrt max_samples in train
  • References to sample indices should be uint16_t, not int16_t
  • Types for general integers should be int, not int16_t
  • Test that the random number generator works reasonably

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant