eqdisco.models.MultiGeneRegressor#
- class eqdisco.models.MultiGeneRegressor(population_size=300, generations=50, max_genes=4, functions=('add', 'sub', 'mul', 'div', 'sin', 'cos', 'exp', 'log', 'sqrt', 'square'), init_depth=(1, 3), max_depth=5, selection='tournament', tournament_size=5, p_crossover=0.8, p_high_level=0.3, p_add_gene=0.15, p_delete_gene=0.1, p_constant=0.2, const_range=(-5.0, 5.0), ridge=1e-08, parsimony=0.0, loss='mse', err_guided=False, elitism=1, n_islands=1, migration_interval=10, migration_size=2, seed_equations=None, model_selection='bic', selection_tolerance=0.01, refit=False, patience=None, time_limit=None, max_evaluations=None, feature_names=None, random_state=None, verbose=0)[source]#
Bases:
_GeneOps,EvolutionaryEstimator,RegressorMixinMulti-gene genetic programming (MGGP) for symbolic regression.
- Parameters:
- population_size, generations
int - max_genes
int, default=4 Maximum number of genes \(m\).
- functionssequence
ofstr - init_depth
tupleofint, default=(1, 3) Depth range of new genes.
- max_depth
int, default=5 Maximum depth of a gene.
- selection, tournament_size
asinSymbolicRegressor - p_crossover
float, default=0.8 - p_high_level
float, default=0.3 Share of crossovers that exchange whole genes.
- p_add_gene, p_delete_gene
float Probabilities of the gene-level mutations.
- ridge
float, default=1e-8 Ridge penalty of the weight estimation (numerical stability).
- parsimony
float, default=0.0 Penalty per node.
- err_guided{
False,True, “replace”}, default=False ERR-guided variation (new in eqdisco, experimental): the gene to be replaced is chosen with probability inversely proportional to its error reduction ratio, the donor gene with probability proportional to it (
True) or uniformly ("replace").- model_selection, selection_tolerance, refit, random_state
asinSymbolicRegressor
- population_size, generations
- Attributes:
- equation_
Equation - pareto_front_
listofEquation - genes_
listofExpression The genes of the selected model (without weights).
- coef_, intercept_
weightsoftheselectedmodel - history_
pandas.DataFrame
- equation_