Uses a genetic algorithm aproach to find a polynomial function from an inputted set of points.
- Get an input from user (X and Y points). Genetic algorithm will then use these points to calculate a fitness function.
- Generate random population with N size. This population represents the coefficients of the polynomial we are trying to find.
- Calculate the fitness function - input X into each polynomial which will get us Y and compare the difference between these values and inputted Y values. (mean absolute error)
- Pick K best from N population
- Mutate and generate new pop from the rest (N-K)
- Repeat
Legend: points in red are user inputted X and Y values, blue is our approximated polynomial function.