|
QDpy
|
Diversified residual symbolic regression with robust coefficient search. More...
Go to the source code of this file.
Classes | |
| class | qdpy.symbolic._residual.ResidualSymbolicElite |
| A raw expression structure and one measured choice of node coefficients. More... | |
| class | qdpy.symbolic._residual.ResidualSymbolicStats |
| Count generated structures, actual coefficient trials, and archive updates. More... | |
| class | qdpy.symbolic._residual.ResidualSymbolicResult |
| Return measured models, cluster labels, and the native archive. More... | |
| class | qdpy.symbolic._residual._ResidualPool |
| class | qdpy.symbolic._residual._ResidualSearch |
Namespaces | |
| namespace | qdpy |
Functions | |
| qdpy.symbolic._residual.residual_symbolic_regression (X, y, *, groups=None, clusters=4, loss="medae", layout="residual", budget=128, fit_evaluations=25, max_fit_evaluations=None, max_depth=4, max_nodes=12, operators=("add", "sub", "mul", "div", "log", "exp"), literals=(1.,), coefficient_bounds=(-12., 12.), fit_sigma=.6, cma_population=6, initial_expressions=(), seed=0) | |
| Evolve expression structures and retain robust fits in distinct residual niches. | |
Diversified residual symbolic regression with robust coefficient search.
Definition in file _residual.py.
| qdpy.symbolic._residual.residual_symbolic_regression | ( | X, | |
| y, | |||
| * | , | ||
| groups = None, | |||
| clusters = 4, | |||
| loss = "medae", | |||
| layout = "residual", | |||
| budget = 128, | |||
| fit_evaluations = 25, | |||
| max_fit_evaluations = None, | |||
| max_depth = 4, | |||
| max_nodes = 12, | |||
| operators = ("add", "sub", "mul", "div", "log", "exp"), | |||
| literals = (1.,), | |||
| coefficient_bounds = (-12., 12.), | |||
| fit_sigma = .6, | |||
| cma_population = 6, | |||
| initial_expressions = (), | |||
| seed = 0 ) |
Evolve expression structures and retain robust fits in distinct residual niches.
| X | Finite (samples, variables) training data. |
| y | One finite regression target per training row. |
| groups | Optional integer label per row, or None to cluster the scaled training data. |
| clusters | K-means cluster count when group labels are absent. |
| loss | Use median absolute error (medae), mean absolute error (mae), or root mean squared error (rmse). |
| layout | Use residual niches or a structural-only control. |
| budget | Hard cap on expression proposals, including repeats. |
| fit_evaluations | Maximum coefficient trials per proposal, including the initial setting. |
| max_fit_evaluations | Optional additional hard cap on coefficient trials over the whole run. |
| max_depth | Maximum depth in edges of the raw expression tree. |
| max_nodes | Maximum number of raw tree nodes. |
| operators | Operation names available to the tree grammar. |
| literals | Numeric constants available to the tree grammar. |
| coefficient_bounds | Common finite interval for node weights. |
| fit_sigma | Initial CMA-ES standard deviation. |
| cma_population | Coefficient trials per complete CMA-ES generation. |
| initial_expressions | Raw seed trees evaluated before genetic variation. |
| seed | Seed for genetic variation, clustering, and coefficient search. |
Run DRSR on labeled training data with an optional structural control. The archive indexes the group with highest mean absolute error, raw tree size, and raw non-algebraic operator count. With ``layout="structural"``, the same search drops the group axis from competition. Choose ``mae``, ``medae`` (median absolute error) or ``rmse`` as the optimization loss. The model's RMSE is recorded independently. If supplied, the rows' integer group labels take precedence over the default k-means clustering of scaled X and y. Each raw tree gains one multiplicative weight per node. Constant folding reuses the native expression evaluator. Bounded CMA-ES trials require the existing ``cma`` extra. Undefined predictions consume a trial. Every finite trial can enter the archive, including lower-ranked coefficients that represent a different residual niche.
Definition at line 188 of file _residual.py.