Fitting a Custom Sigmoid

9 visualizaciones (últimos 30 días)
Jane Kelleher
Jane Kelleher el 26 de Ag. de 2020
Comentada: Alex Sha el 27 de Ag. de 2020
Hello,
I have a set of data that decays in a sigmoidal fashion. I believe it should be a good fit to a function of the form shown in the first screenshot, but when I use the Custom Fit feature in the Curvefitting App matlab gives a -Rsq so something is clearly going wrong. I have attached a screenshot of the attempted fit and result as well. I would really appreciate any advice or input as to why this may not be working and alternatives I could try.
Thank you!
  3 comentarios
Jane Kelleher
Jane Kelleher el 26 de Ag. de 2020
Editada: Jane Kelleher el 26 de Ag. de 2020
Hi Image Analyst,
Thanks for taking a look! If you use a very small a2, eg a2 = .001, then the plot looks as shown. I tried supplying small initial guesses for a2 in hopes to achieve this but no luck. I have attached my data as well. Would really appreciate any advice.
X: xfitting = 11.9548 12.2163 12.4557 12.6716 12.8765 13.0460 13.1972 13.3442 13.5011 13.6685 13.8478 13.9055 13.9632 14.0369 14.1113 14.1835 14.2536 14.3221 14.3893 14.4557 14.5215 14.5868 14.6518 14.7165 14.7811 14.8456 14.9100 14.9743 15.0385 15.1028 15.1670 15.2311 15.2953
Y: S_nonresistantdecline = 7.6631 7.6559 7.6296 7.5846 7.5179 7.4405 7.3509 7.2422 7.0991 6.9124 6.6719 6.5860 6.4965 6.3773 6.2533 6.1313 6.0132 5.9015 5.7971 5.7009 5.6140 5.5376 5.4724 5.4181 5.3743 5.3397 5.3130 5.2927 5.2775 5.2663 5.2581 5.2520 5.2477
Jane Kelleher
Jane Kelleher el 26 de Ag. de 2020
I also tried adding a plateau for the base, ie: a1 * exp(-a2 .* exp(X)) + a3

Iniciar sesión para comentar.

Respuesta aceptada

Alex Sha
Alex Sha el 27 de Ag. de 2020
Hi,if the fitting function is:
1:y=a1*exp(-a2*exp(x))
Root of Mean Square Error (RMSE): 0.291990919479646
Sum of Squared Residual: 2.81353700293277
Correlation Coef. (R): 0.943693599341358
R-Square: 0.890557609437848
Adjusted R-Square: 0.883261450067038
Parameter Best Estimate
---------- -------------
a1 7.58840204504645
a2 1.16352684388827E-7
2:y=a1*exp(-a2*exp(x))+a3
Root of Mean Square Error (RMSE): 0.111213914229836
Sum of Squared Residual: 0.408161645704602
Correlation Coef. (R): 0.991993546182226
R-Square: 0.984051195667188
Adjusted R-Square: 0.982987942045001
Parameter Best Estimate
---------- -------------
a1 3.31691483854775
a2 6.92191293955397E-7
a3 4.93177045354278
3:y=a1*exp(-a2*exp(a4*x))+a3
Root of Mean Square Error (RMSE): 0.00643423581192002
Sum of Squared Residual: 0.001366179885952
Correlation Coef. (R): 0.999973308091645
R-Square: 0.999946616895747
Adjusted R-Square: 0.999943058022131
Parameter Best Estimate
---------- -------------
a1 2.46665608498939
a2 4.05630590375969E-12
a4 1.85195743324274
a3 5.25959927640292
  3 comentarios
Jane Kelleher
Jane Kelleher el 27 de Ag. de 2020
Nevermind, got it working- thank you very much!!
Alex Sha
Alex Sha el 27 de Ag. de 2020
Hi, Jane, the above results posted are obtained from another software of "1stOpt". For the fitting function of "y=a1*exp(-a2*exp(a4*x))+a3", it looks simple, but seems to be very difficulty for Matlab, either cftool or lsqcurvefit/nlinfit, to get proper outcomes.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by