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,RegressorMixinCooperative GP whose population is a library of terms selected by OLS (new in eqdisco).
- Parameters:
- population_size
int, default=200 Size of the shared library of basis functions.
- generations
int, default=40 - max_terms
int, default=8 Maximum number of terms of the model.
- criterion{“bic”, “aic”, “err”}, default=”bic”
Stopping rule of the forward selection.
- functionssequence
ofstr - init_depth
tupleofint, default=(1, 3) - max_depth, max_size
int Limits of a basis function.
- tournament_size
int, default=4 - p_crossover
float, default=0.6 - size_penalty
float, default=0.002 Fitness penalty per node of a basis function (favors short terms).
- random_state
int,optional
- population_size
- Attributes:
- equation_
Equation The best model found (lowest BIC over the generations).
- pareto_front_
listofEquation Nested models of the forward selection paths (union over generations, non-dominated).
- terms_
listofExpression Terms of
equation_.- history_
pandas.DataFrame
- equation_