T O P I C R E V I E W |
RiverFalls |
Posted - 03/08/2023 : 8:23:23 PM Origin 2022 (64-bit) SR1 9.9.0.225 (Academic) Win10
This is not critical at all, but I am curious as to why this happens. If the user tries to fit a line to two data points in Simple Fit - with a user defined function - the fit fails. If we use an existing linear fit function, the fit does not fail.
Just curious, thank you. Lowell
 |
3 L A T E S T R E P L I E S (Newest First) |
AmandaLu |
Posted - 03/12/2023 : 11:38:07 PM Hi,
When the number of fitted parameters is equal to the number of input data, the result is not reliable. If you try your data and user-defined function in Analysis: Fitting: Nonlinear Curve Fit tool, you will get a clearer warning message: Fit may have converged, the number of parameters is greater than or equal to the number of input data and results are unreliable. And you will get Degree of Freedom = 0 in the fitting report.
App follows a stricter rule when the degree of freedom is 0 the iteration cannot continue. If you really want to fit a function with equal parameter number to the input data, you can try Analysis: Fitting: Nonlinear Curve Fit. Even thought it gets warning message it can generate fitting result. But keep in mind the fitting result is not reliable.
Thanks, Amanda OriginLab Technical Service
|
RiverFalls |
Posted - 03/09/2023 : 08:19:01 AM Amanda, I think you misunderstood my question. I'm aware how curve fitting works, and that the number of free parameters must be equal to or greater than the number of data points. My question is: why does the nonlinear fitter work with pre-defined functions, for this case of two free parameters and two points, but not with a user-defined function? What is the functional difference between how the fitting routine works for the pre-defined function vs. a user-defined function? Thank you, Lowell |
AmandaLu |
Posted - 03/08/2023 : 10:50:00 PM Hi,
When you use Nolinear Fit to fit your user-defined function, the number of function parameters must be larger than the number of data points. Usually if you have more data, you can get more reliable fitting result. It does not make sense to determine two fitting parameters by just two data points. If you increate your data points by one, you can get the result like the following.

Thanks, Amanda OriginLab Technical Service
|
|
|