Finding AIC for an exponential model

12 visualizaciones (últimos 30 días)
Alice Lam
Alice Lam el 30 de Jul. de 2021
Respondida: Phil Steindel el 30 de Jul. de 2021
Is there any way to find the AIC for an exponential model? I know fitlm gives me the AIC for a linear regression, but I can't seem to calculate the AIC for an exponential fit as described by the code at the bottom. I have tried expfit, which returned a single parameter, and the aic() function, but I can't figure out how to turn this into a state-space model that would work with the aic function.
exp_fit = fittype(@(a,b,c,d,x) a+b*exp(c*x+d));
exp_fit_options = fitoptions(exp_fit);
exp_fit_options.Upper = [Inf, Inf, Inf];
exp_fit_options.Lower = [-Inf, 0, 0];
linear_model = fitlm(x,y)
exp_model = fit(x, y, exp_fit)

Respuestas (1)

Phil Steindel
Phil Steindel el 30 de Jul. de 2021
Hi Alice,
Assuming you have access to Machine Learning Toolbox (as you've used fitlm and expfit), you can try fitnlm. As with fitlm, the AIC is in the ModelCriterion property of the output. Note that you will also have to specify an initial guess for the parameters, and you won't be able to specify upper and lower bounds for them as you have done here.

Categorías

Más información sobre Fit Postprocessing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by