I implement a function approximator with the help of genetic programming. In this project I only use simple functions such as:
- +(addition)
- -(subtraction)
- *(multiplication)
- /(division)
- ^(exponentiation)
- cos(x) and sin(x)
The picture below is the first approximation of the program for the x*cos(x) function:
There is a little error in the results. (the blue one is an approximation and the red one is an exact function). The picture below is another approximation for x*cos(x):
As you see, both are the same and depict it with black color.
To provide a complex example, we give our program a discrete function, and below are the results: