Brushfire is a Scala framework for distributed supervised learning of decision tree ensemble models, archived by Stripe. The framework implements distributed tree learning inspired by Google's PLANET research, but generalizes the approach through Scala's type parameterization and Algebird's aggregation abstractions. The project is classified across multiple machine learning domains including decision trees, random forests, classification, regression, scalable algorithms, distributed computing, and big data analysis.
The framework supports a comprehensive set of features for building decision tree ensembles. It handles both binary and multi-class classifiers, numeric features in both discrete and continuous forms, and categorical features including those with very high cardinality. The system includes k-fold cross validation and random forest capabilities, uses chi-squared tests as a measure of split quality, and can compute feature importance and Brier scores. At the time of archival, Brushfire relied on Scalding and Hadoop as its distributed computing platform, though the documentation indicates plans to add support for Spark and single-node in-memory platforms in the future.
The framework is designed around a modular architecture that accepts training data as Scalding TypedPipes of Instance objects. Each instance contains a unique identifier, optional timestamp, a feature map with mixed types, and target information. The system provides built-in support for common feature types including Int, Double, Boolean, and String, with a Dispatched type system allowing users to mix different feature types through Ordinal, Nominal, Continuous, and Sparse value wrappers. This flexibility enables handling of features with varying cardinality characteristics.
Brushfire offers multiple sampling strategies through its Sampler interface. The SingleTreeSampler constructs a single tree from all training data, KFoldSampler creates k trees for cross-validation by excluding random portions of data, and RFSampler implements random forest methodology with bootstrap sampling and feature subsampling. The framework's expansion mechanism allows distributed tree building through the expandTimes method, which serializes intermediate results to HDFS, followed by optional in-memory expansion of small nodes through expandSmallNodes.
The framework is highly extensible, allowing developers to add new sampling strategies by implementing custom Samplers, introduce new evaluation metrics through Evaluators, define new feature types or binning strategies via Splitters, add target types like regression through combinations of Evaluators and Stoppers, and integrate new distributed computing platforms. The project was authored by Avi Bryant with contributions from Edwin Chen, Dan Frank, Nathan Howell, Roban Kramer, Colin Marc, Steven Noble, Erik Osheim, and Tom Switzer. Integration with SBT projects is straightforward through dependency declarations, and Maven projects can incorporate Brushfire as a JAR dependency. The framework supports both JSON and Kryo serialization for tree models, with JSON providing human readability and Kryo offering efficiency for large trees.