Hey there, I’m really new here. A friend recommended this as a tool to solve a tricky problem, so I started my free trial of WolframOne, but I’m struggling to get it working. I’ve programmed in traditional languages and Matlab script, but things are just different enough to be intensely frustrating.
Long story short, I have a decent set of inputs/outputs, and I’m trying to reverse engineer the function that’s used to generate them. Where I’m at:
I am able to load the datapoints into arrays
I am able to combine the arrays into a table
When I try to use FindFormula on that table, I get a piecewise linear approximation, which is clearly incorrect
Hey David, thanks for chiming in. However, this data is nonlinear. The first few points fit directly to y = 0.1x, but once x is over 100, we see that we’ve dropped slightly below that. By the time we’re in the 200s, increasing from 213 to 225 gives an increase of only 1.0, rather than 1.2.
The example you gave of (* 0.438595 + 0.0911061 x *) would mean f(16) ~ 1.9, which is significantly off the observed result of 1.6.
However, whether or not this specific dataset does end up being linear, I have some others that definitely aren’t. Do you know how I could get best curve fit that checks for potential logarithmic curves, polynomial curves, and/or sigmoids?
Yes, In fact a second degree polynomial is a better fit. Mathematica is capable of very sophisticated curve fitting. I attach a notebook that demonstrates this. In my opinion, curve fitting is most useful when we have a model based on theory, and we use the fit to determine the values of meaningful parameters. Mathematica is very good at that.
Edit: I am not familiar with Wolfram One. If you have trouble opening the notebook let me know.