Finding AIC for an exponential model
16 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Phil Steindel
il 30 Lug 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 Commenti
Vedere anche
Categorie
Scopri di più su Fit Postprocessing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!