Skip to contents

Fitting and prediction

Fit a model, predict with it, and print it.

rpf()
Random Planted Forest
predict(<rpf_pruned>)
Predictions of a pruned Random Planted Forest
predict(<rpf>)
Predict with a Random Planted Forest
print(<rpf_pruned>)
Print a pruned Random Planted Forest
print(<rpf>)
Print a Random Planted Forest

Reading the model

The components that add up to the prediction, and the purification that makes them unique.

predict_components()
The components of a Random Planted Forest's prediction
purify() is_purified()
Purify a Random Planted Forest

Pruning

Leave out the small components, by a rule chosen out of bag or by cross-validation.

prune_components()
Prune the components of a Random Planted Forest

The number of splits and tuning

The out-of-bag error along the splits, and the search over the greediness and the leaf size.

oob_path_checkpoints()
Checkpoints of the out-of-bag path
tune_control()
Settings of the out-of-bag tuning
greediness_ladder()
The greediness ladder of the out-of-bag tuning

Looking inside a tree family

Draw the trees of one family, or get its leaves as boxes.

plot(<rpf>)
Plot a tree family
rpf_boxes()
Extract the boxes of a tree family

Saving and restoring

Models hold a C++ object, which needs marshalling to survive saveRDS() or a worker process.

rpf_marshal() rpf_unmarshal()
Serialize and restore Random Planted Forests
rpf_is_valid()
Check whether a model's C++ forest is still alive
bundle(<rpf>) bundle(<rpf_pruned>)
Bundle a Random Planted Forest

Utilities

Compact printing of the flattened forest (export_forest = TRUE).

print(<rpf_forest>) str(<rpf_forest>)
Compact printing of forest structures