View gist:dfde205260c75d10f16b
### finding the best fit line for data with a random error ### | |
# | |
# a simplification of the example given at http://acodersmusings.blogspot.co.uk/2009/07/curve-fitting-with-pyevolve.html | |
# | |
# using a genetic algorithm to infer the parameters of a model - the simplest form possible, a straight line fit. | |
# | |
from pyevolve import G1DList, GSimpleGA, Selectors, Scaling, DBAdapters | |
import numpy |