Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion doc/examples/gp_symbreg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ individual's fitness.
In this example, we use a classical distribution, the quartic polynomial
:math:`(x^4 + x^3 + x^2 + x)`, a one-dimension distribution. *20* equidistant
points are generated in the range [-1, 1], and are used to evaluate the
fitness.
fitness.

Note that in this example, the ``evalSymbReg`` function has the polynomial being
regressed to hard coded, and thus the :math:`y` value can be calculated for each
value of :math:`x`. If one were using the system to fit other data, the hard coded
quadratic polynomial expression would need to be replaced. For example,
:math:`\frac{1}{n}\sum_{i=1}^{n}(\hat{y_{i}} - y_{i})^2`, where :math:`\hat{y_{i}}` is
a candidate solution's predicted value based on the independent variables, and
:math:`y_{i}` is the the expected value.


Creating the primitives set
Expand Down