Skip to content

ForestFire

ForestFire

ForestFire is a tree-learning library with a Rust core and a Python API.

It is built around three ideas:

  • one unified train(...) interface instead of learner-specific entrypoints
  • one unified Table abstraction for training data
  • one explicit model IR for serialization, portability, and runtime lowering

Those choices are deliberate:

  • the unified training surface keeps the public API stable even as the library grows from single trees into forests and boosting
  • the Table abstraction centralizes preprocessing, binning, sparse handling, and canary generation so the learners do not each re-implement data plumbing
  • the explicit IR separates model semantics from trainer internals, which is what makes optimized inference, introspection, and serialization all line up with the same underlying meaning

What exists today

  • decision trees, random forests, and gradient boosting
  • classification and regression
  • optimized inference runtimes
  • model introspection and dataframe export
  • Python and Rust APIs
  • JSON model serialization

ForestFire is intentionally opinionated in a few places:

  • it prefers a small number of strong public concepts over many learner-specific entrypoints
  • it treats training-time preprocessing as part of the model contract, not an invisible side effect
  • it uses canaries as an in-training stopping signal instead of relying on post-hoc pruning
  • it exposes optimized inference as a separate runtime view rather than pretending the training structure is automatically the best scoring structure

Documentation map