eqdisco.models.CooperativeOLSRegressor#

class eqdisco.models.CooperativeOLSRegressor(population_size=200, generations=40, max_terms=8, criterion='bic', functions=('add', 'sub', 'mul', 'div', 'sin', 'cos', 'exp', 'log', 'sqrt', 'square'), init_depth=(1, 3), max_depth=5, max_size=15, tournament_size=4, p_crossover=0.6, size_penalty=0.002, p_constant=0.1, const_range=(-3.0, 3.0), feature_names=None, random_state=None, verbose=0)[source]#

Bases: BaseEstimator, RegressorMixin

Cooperative GP whose population is a library of terms selected by OLS (new in eqdisco).

Parameters:
population_sizeint, default=200

Size of the shared library of basis functions.

generationsint, default=40
max_termsint, default=8

Maximum number of terms of the model.

criterion{“bic”, “aic”, “err”}, default=”bic”

Stopping rule of the forward selection.

functionssequence of str
init_depthtuple of int, default=(1, 3)
max_depth, max_sizeint

Limits of a basis function.

tournament_sizeint, default=4
p_crossoverfloat, default=0.6
size_penaltyfloat, default=0.002

Fitness penalty per node of a basis function (favors short terms).

random_stateint, optional
Attributes:
equation_Equation

The best model found (lowest BIC over the generations).

pareto_front_list of Equation

Nested models of the forward selection paths (union over generations, non-dominated).

terms_list of Expression

Terms of equation_.

history_pandas.DataFrame