Release History¶
Version 0.4.3 - 6 Jan 2026¶
Update dependencies to ensure compatibility with
scikit-learnand newer versions of Python.scikit-learn1.8.0 or newer will be required as well as Python 3.11 or newer. Also migrated packaging tohatchthrough this is unlikely to affect most users.
Version 0.4.2 - 3 May 2022¶
Require keyword only arguments for all public methods and functions to comply with
scikit-learnSLEP009.Replace
n_features_attribute withn_features_in_to comply withscikit-learnSLEP010.Update test suite to ensure compatibility with
scikit-learn.scikit-learn1.0.2 or newer will be required due to recent changes in their testing requirements. Also requiringjoblibto 1.0.0 or newer to align with next release of scikit-learn.Added the class_weight parameter to
genetic.SymbolicClassifierallowing users to easily compensate for imbalanced datasets.
Version 0.4.1 - 1 Jun 2019¶
Fixed a bug with multi-processing and custom functions, allowing pickling of models with custom functions, fitness metrics or classifier transformers.
joblib0.13.0 or newer required in order to take advantage of this release in order to wrap functions for pickling saved models.
Version 0.4.0 - 23 Apr 2019¶
Added the
genetic.SymbolicClassifierto use symbolic regression to solve binary classification problems. This passes the outputs of a program through a sigmoid function in order to translate the result into a probability of either class.Allow users to express feature names as strings rather than X0, X1, etc. Graphviz and
print()output can now be customized by settingfeature_names=[...]ingenetic.SymbolicRegressororgenetic.SymbolicTransformer.Allow users to exclude constants from their programs by setting
const_range=Noneingenetic.SymbolicRegressororgenetic.SymbolicTransformer.Record details (similar to the verbose output) of the evolution in the estimator attribute
run_details_dict ingenetic.SymbolicRegressorandgenetic.SymbolicTransformer.Pearson and Spearman correlation coefficients added as first-class metrics to
genetic.SymbolicRegressor. These metrics allow for evolution of value-added features for second-stage estimators.Added a low_memory parameter in
genetic.SymbolicRegressorandgenetic.SymbolicTransformerwhich can reduce memory use for cases where there are large populations or many generations by removing early generation program information. By Bartol Karuza and wulfihm.Drop support for Python 2.7 and Python 3.4 to ensure compatibility with
scikit-learn.scikit-learn0.20.0 or newer will also be required due to recent changes in their testing suite. Additionally joblib 0.11 or newer will be required due to scikit-learn devendoring it.
Version 0.3.0 - 23 Nov 2017¶
Fixed two bugs in
genetic.SymbolicTransformerwhere the final solution selection logic was incorrect and suboptimal. This fix will change the solutions from all previous versions of gplearn. Thanks to iblasi for diagnosing the problem and helping craft the solution.Fixed bug in
genetic.SymbolicRegressorwhere a custom fitness measure was defined infitness.make_fitness()with the parameter greater_is_better=True. This was ignored during final solution selection. This change will alter the results from previous releases where greater_is_better=True was set in a custom fitness measure. By sun ao.Increase minimum required version of
scikit-learnto 0.18.1. This allows streamlining the test suite and removal of many utilities to reduce future technical debt. Please note that due to this change, previous versions may have different results due to a change in random sampling noted here.Drop support for Python 2.6 and add support for Python 3.5 and 3.6 in order to support the latest release of
scikit-learn0.19 and avoid future test failures. By hugovk.
Version 0.2.0 - 30 Mar 2017¶
Allow more generations to be evolved on top of those already trained using a previous call to fit. The
genetic.SymbolicRegressorandgenetic.SymbolicTransformerclasses now support thewarm_startparameter which, when set toTrue, reuse the solution of the previous call to fit and add more generations to the evolution.Allow users to define their own fitness measures. Supported by the
fitness.make_fitness()factory function. Using this a user may define any metric by which to measure the fitness of a program to optimize any problem. This also required modifying the API slightly with the deprecation of the'rmsle'error measure for thegenetic.SymbolicRegressor.Allow users to define their own functions for use in genetic programs. Supported by the
functions.make_function()factory function. Using this a user may define any mathematical relationship with any number of arguments and grow totally customized programs. This also required modifying the API with the deprecation of the'comparison','transformer'and'trigonometric'arguments to thegenetic.SymbolicRegressorandgenetic.SymbolicTransformerclasses in favor of the newfunction_setwhere any combination of preset and user-defined functions can be supplied. To restore previous behavior initialize the estimator withfunction_set=['add2', 'sub2', 'mul2', 'div2', 'sqrt1', 'log1', 'abs1', 'neg1', 'inv1', 'max2', 'min2'].Reduce memory consumption for large datasets, large populations or many generations. Indices for in-sample/out-of-sample fitness calculations are now generated on demand rather than being stored in the program objects which reduces the size significantly for large datasets. Additionally “irrelevant” programs from earlier generations are removed if they did not contribute to the current population through genetic operations. This reduces the number of programs stored in the estimator which helps for large populations, high number of generations, as well as for runs with significant bloat.
Version 0.1.0 - 6 May 2015¶
Initial public release supporting symbolic regression tasks through the
genetic.SymbolicRegressorclass for regression problems and thegenetic.SymbolicTransformerclass for automated feature engineering.