This Python 3 code is a simple implementation of genetic programming for symbolic regression, and has been developed for educational purposes.
Numpy. The file test.py
shows an example of usage, and requires Scikit-learn.
You can install it with pip using python3 -m pip install --user simplegp
, or locally by downloading the code and running python3 setup.py install --user
.
- Create RelU node
Measure
- Number of generations
- Time taken
- Maximum Fitness
- Some measure of diversity
- Different initial population sizes
- Different mutation probabilities
- Tournament selection size
- Subtree Size
- Uniformly randomly select individuals to do gradient descent
- Top k% of nodes (Implementation could be tricky because it requires another evalutaiont round)
- When to apply graident descent (every x generations)
- Different graident descent learning rates for different generations, maybe course vs fine grained
- Combinations of above (Just pass the corresponding parameters in defining backprop function)
- Iterations of gradient descent, 2 levels, lower for everyone, and then higher for top k
- What sort of parameters should we test for in the general GP (not including gradient descent)? Do we even need to optimise these?