User guide#

The guides explain how to use RuleTree, from the objects a tree is made of to writing new stumps. Their examples run as they are, and print what is shown under them. To install RuleTree and train a first tree, start from Getting started.

How RuleTree works

Trees, nodes, stumps, transformers and splitters.

How RuleTree works
Choosing the splits

The available stumps, which one to use and how to combine them.

Choosing the splits: stumps
Several data types

Tabular data, time series and images, alone or together.

Tabular data, time series and images
Reading the tree

Rules, drawings, nodes, leaves and contributions of the features.

Reading the tree
Growing and updating

partial_fit, update_statistics and the cache of the stumps.

Growing and updating trees
Saving and loading

What to_dict saves and how from_dict rebuilds a tree.

Saving and loading trees
Ensembles

Gradient boosting, XGBoost and explainable boosting of RuleTrees.

Ensembles
Evaluating the models

Metrics of predictions, clusters, size of the trees and fairness.

Evaluating the models
Splits with a custom gain

Evaluating all the candidate splits together and changing their gain.

Splits with a custom gain
Extending the library

New transformers, splitters and stumps.

Extending the library