Skip to contents

TODO: Explain what this does

Usage

purify(x, ...)

# Default S3 method
purify(x, ...)

# S3 method for class 'rpf'
purify(x, ...)

is_purified(x)

Arguments

x

And object of class rpf.

...

(Unused)

Value

Invisibly: The rpf object.

Details

Unless rpf() is called with purify = TRUE, the forest has to be purified after fit to ensure the components extracted by predict_components() are valid. predict_components() will automatically purify a forest if is_purified() reports FALSE.

Examples

rpfit <- rpf(mpg ~., data = mtcars, max_interaction = 2, ntrees = 10)
purify(rpfit)
#> -- Regression Random Planted Forest --
#> 
#> Formula: mpg ~ . 
#> Fit using 10 predictors and 2-degree interactions.
#> Forest is purified!
#> 
#> Called with parameters:
#> 
#>             loss: L2
#>           ntrees: 10
#>  max_interaction: 2
#>           splits: 30
#>        split_try: 10
#>            t_try: 0.4
#>            delta: 0
#>          epsilon: 0.1
#>    deterministic: FALSE
#>         nthreads: 1
#>           purify: FALSE
#>               cv: FALSE