From 2998be6f142dc9df7583e0c8dfaa3ccdb69afb74 Mon Sep 17 00:00:00 2001 From: James Hughes Date: Thu, 4 Nov 2021 10:55:54 -0300 Subject: [PATCH 1/3] Add clarity on eval function values --- doc/examples/gp_symbreg.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/examples/gp_symbreg.rst b/doc/examples/gp_symbreg.rst index aa1168542..e721bd6ae 100644 --- a/doc/examples/gp_symbreg.rst +++ b/doc/examples/gp_symbreg.rst @@ -18,7 +18,14 @@ 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 dependent variables, and +:math:`y_{i}` is the the expected value. Creating the primitives set From e4fbf9e8f8d583e8a7d0b735a2c6d7c78dec8ce5 Mon Sep 17 00:00:00 2001 From: James Hughes Date: Thu, 4 Nov 2021 10:59:16 -0300 Subject: [PATCH 2/3] dependent -> independent --- doc/examples/gp_symbreg.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/examples/gp_symbreg.rst b/doc/examples/gp_symbreg.rst index e721bd6ae..38832d95b 100644 --- a/doc/examples/gp_symbreg.rst +++ b/doc/examples/gp_symbreg.rst @@ -24,7 +24,7 @@ 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 dependent variables, and +a candidate solution's predicted value based on the independent variables, and :math:`y_{i}` is the the expected value. From 1cb44bcb9a3c23de4864fe307f1f58c9cd1ee8ab Mon Sep 17 00:00:00 2001 From: James Alexander Hughes Date: Tue, 19 Apr 2022 11:28:21 -0300 Subject: [PATCH 3/3] format --- doc/examples/gp_symbreg.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/examples/gp_symbreg.rst b/doc/examples/gp_symbreg.rst index 38832d95b..65673c56e 100644 --- a/doc/examples/gp_symbreg.rst +++ b/doc/examples/gp_symbreg.rst @@ -21,8 +21,9 @@ points are generated in the range [-1, 1], and are used to evaluate the 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, +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.