In addition to automated symbolic regression, leaf
allows users to define their own candidate equations using the
"manual" engine. This enables direct testing of hypotheses
and incorporation of prior knowledge, while still leveraging
leaf’s tools for parameter fitting, evaluation, and
multi-view modeling.
User-defined equations are specified as character strings. These can include:
Even in manual mode, search_equations() is used to register and preprocess the equations. No search is performed.
# Only one equation gets a finite loss
fit_results <- regressor$fit(data = train_data)
#> Error in `py_call_impl()`:
#> ! RuntimeError: You must run equation_search() before fitting parameters.
#> Run `reticulate::py_last_error()` for details.
pareto_front <- regressor$evaluate(metrics = c("RMSE", "PseudoR2"))
#> Error in `py_call_impl()`:
#> ! RuntimeError: You must run equation_search() before scoring.
#> Run `reticulate::py_last_error()` for details.
head(pareto_front)
#> Error:
#> ! object 'pareto_front' not found