Initialization
# Install the Python backend (only needs to be done once).
leaf::install_leaf()
# Load package
library(leaf)
## leaf: Python environment not configured. Run install_leaf() to set it up.
if (!backend_available()) {
message("Install backend with leaf::install_leaf()")
}
## Install backend with leaf::install_leaf()
# Initialize the symbolic regressor
regressor = leaf::SymbolicRegressor$new(
engine = "rsrm",
loss = 'PoissonDeviance',
num_iterations = 3,
base = list(verbose = FALSE)
)
#> Error:
#> ! Python backend not installed. Run leaf::install_leaf().