Is it possible to provide any arguments to FindFormula
to force it to avoid using Piecewise
in the result, but instead try to find the best fit using expressions constructed only from functions specified in TargetFunctions
option?
To give a concrete example, consider e.g. the data in this question. FindFormula
will always return a Piecewise
expression with many pieces:
In many (most?) applications, it is reasonable to assume that the function is smooth, and a piecewise result is simply not useful.
SpecificityGoal-> "Low"
help? The documentation states that this results in simpler fits. My unsolicited advice is to avoidFindFormula
completely or accept the fits that it provides. Any calculations with a piecewise fit will still be performed by a computer and not by hand so what exactly is the downside to having a piecewise result? $\endgroup$Piecewise
results often are not even continuous. $\endgroup$fit = FindFormula[table1, x, Method -> "NonLinearRegression", SpecificityGoal -> "High", TargetFunctions -> {Plus, Times, Power, Sin, Cos, Tan, Cot, Log, Sqrt, Csc, Abs, Exp}]
has outcome0.317828 - 2. E^(-.901747 x) + 0.511021 x
while in v.12.3 it gives0.317828 - 2.2358 E^(-1. x) Sqrt[x] + 0.511021 x
. How it can solve your problem? $\endgroup$