Finding AIC for an exponential model
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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)
0 commentaires
Réponses (1)
Phil Steindel
le 30 Juil 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.
0 commentaires
Voir également
Catégories
En savoir plus sur Fit Postprocessing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!