Regression
AMF Regressor

AMF Regressor

Aggregated Mondrian Forest regressor for online learning.

This algorithm is truly online, in the sense that a single pass is performed, and that predictions can be produced anytime.

Each node in a tree predicts according to the average of the labels it contains. The prediction for a sample is computed as the aggregated predictions of all the subtrees along the path leading to the leaf node containing the sample. The aggregation weights are exponential weights with learning rate step using a squared loss when use_aggregation is True.

This computation is performed exactly thanks to a context tree weighting algorithm. More details can be found in the original paper1.

The final predictions are the average of the predictions of each of the n_estimators trees in the forest.

Parameters

  • n_estimators(int, Default:10) → The number of trees in the forest.

  • step (float, Default:1.0) → Step-size for the aggregation weights.

  • use_aggregation(bool, Default:True) → Controls if aggregation is used in the trees. It is highly recommended to leave it as True.

  • seed(int | None, Default:None) → Random seed for reproducibility.

Example Usage

We can create an instance of the AMF Regressor model like this.

import turboml as tb
amf_model = tb.AMFRegressor()

Footnotes

  1. Mourtada, J., Gaïffas, S., & Scornet, E. (2021). AMF: Aggregated Mondrian forests for online learning. Journal of the Royal Statistical Society Series B: Statistical Methodology, 83(3), 505-533.