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, RegressorMixin

Multi-gene genetic programming (MGGP) for symbolic regression.

Parameters:
population_size, generationsint
max_genesint, default=4

Maximum number of genes \(m\).

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

Depth range of new genes.

max_depthint, default=5

Maximum depth of a gene.

selection, tournament_sizeas in SymbolicRegressor
p_crossoverfloat, default=0.8
p_high_levelfloat, default=0.3

Share of crossovers that exchange whole genes.

p_add_gene, p_delete_genefloat

Probabilities of the gene-level mutations.

ridgefloat, default=1e-8

Ridge penalty of the weight estimation (numerical stability).

parsimonyfloat, 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_stateas in SymbolicRegressor
Attributes:
equation_Equation
pareto_front_list of Equation
genes_list of Expression

The genes of the selected model (without weights).

coef_, intercept_weights of the selected model
history_pandas.DataFrame
gene_table(X=None, y=None)[source]#

ERR, weight and formula of every gene of the selected model (pandas DataFrame).