FindFormula
is great start on the path to full symbolic regression and I realize it's level of development is only experimental at this stage. But if I happen to know that the underlying function I seek (for which I only have a small sample of data points) is monotonically decreasing with the independent variable x, can I communicate this desired feature to FindFormula
? The intent would be for FindFormula
to then return only those formulas that are monotonically decreasing with x.
Of course, one can think of many other features/constraints that could be desired, some could be based on a defined range (interval) of x.
If this capability is not yet possible, would this be of interest to others for the developers to consider for future versions of Mathematica ?
Here is a simple example
xvalue = {0, 20, 32, 45, 62, 91};
yvalue = {1, .905, .899, .868, .851, .812};
data = Transpose[{xvalue, yvalue}];
plot1 = ListPlot[data, Frame -> True, FrameLabel -> {"X", "Y"},
PlotRange -> {{0, 150}, {-.01, 1.01}}, PlotStyle -> Red]
model1 = FindFormula[data, x]
plot2 = Plot[model1, {x, 0, 150}, Frame -> True,
FrameLabel -> {"X", "Y"}, PlotRange -> {{0, 150}, {-.01, 1.01}}]
Show[plot1, plot2, PlotLabel -> "Fit Performance"]
The returned formula is
1 - 0.0172917 x + 0.00114523 x^2 - 0.0000336748 x^3 + 4.26823*10^-7 x^4 - 1.92155*10^-9 x^5
And the plot comparison
Now if I require the formula to be monotonically decreasing (everywhere) is it possible to tell FindFormula that ?
What if I require the formula to have Y values constrained between zero and 1 inclusive ?
What if I know the underlying function is asymptotic to a Y value of 0.7 ? Or asymptotic to a Y value of zero ?
Such control with singular and multiple constraints would be very useful.