Changing Coefficient Lower Bound While Fitting Significantly Reduces R-Square, Despite The Bound Not Restricting The Fit

5 visualizaciones (últimos 30 días)
I will use the Curve fitting toolbox as an example, because I think it is the easiest way to reproduce this erros. I'm using this set of data:
x: [0.150000000000000;0.199800000000000;0.225000000000000;0.240000000000000;0.250000000000000]
y: [0.005516000000000;0.005363000000000;0.005293000000000;0.005257000000000;0.005235000000000]
And I am trying to fit this data with a polynomial fit, of degree two. I am not using the robust option and the center and scale box is unchecked. I know that my data should always be rising on the left side. To set this behavior I am setting the lower bound of the p1 Coefficient to 0, as shown below.
The problem is that the fit is changing, and getting worse when I set this lower bound, despite the fit before setting the lower bound already having a positive p1 value. Here are the results from before and after setting the bound, respectively.
My question is how can I improve this fit while also mantaining the p1 restriction? This can be via code or through the Curve Fitting Toolbox, It will eventually converted to code later anyways.

Respuestas (0)

Categorías

Más información sobre Get Started with Curve Fitting Toolbox en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by