This Python 3 code is an implementation of multi-objective genetic programming using NSGA-II for symbolic regression.
Note: a C++ re-implementation is available in the GP-GOMEA repo.
Added penalization of duplicates (from ref. [2]) to better preserve diversity (left img: penalization ON, right img: penalization OFF):
Numpy & scikit-learn.
Run pip install --user .
from within the folder.
pyNSGP can be run as a scikit-learn regression estimator. See test.py
for an example.
The first objective is the mean-squared-error, the second is solution size. If use_interpretability_model=True
is used, then the second objective is implemented by predicting human-interpretability according to the linear model found in the paper referenced below.
If you use this code, please support our research by citing the related paper(s) that applies:
[1] M. Virgolin, A. De Lorenzo, E. Medvet, F. Randone. "Learning a Formula of Interpretability to Learn Interpretable Formulas". Parallel Problem Solving from Nature XVI (2020). arXiv preprint. Video.
[2] M. Virgolin, A. De Lorenzo, F. Randone, E. Medvet, M. Wahde. "Model Learning with Personalized Interpretability Estimation (ML-PIE)". EC+DM Workshop at the Genetic and Evolutionary Computation Conference (2021). arXiv preprint. Video.
For the other part of the code used in [1], see this repository. For the other part of the code used in [2], see this repository.