How to calculate AIC from an fmincon optimization

3 ビュー (過去 30 日間)
Rozh Al-Mashhdi
Rozh Al-Mashhdi 2016 年 4 月 22 日
回答済み: Vaibhav Awale 2016 年 5 月 3 日
I have some independent and dependent data measurements in two variables (vectors), called X and Y, respectively. I am using fmincon to minimize the following cost function
function SSerr = ObjFun(C, X, Y)
Yhat = Model(C, X);
T = ( Yhat - Y ).^2;
SSerr = sum(T(:));
end
the function "Model" above just calculates the predicted values (Yhat) based on the measured independent variable data (X) and some fit-parameters (C).
I assume that the errors (deviations between predicted Yhat and measured Y) come from a normal (Gaussian) distribution with mean=0 and variance sigma, G(0, sigma2)
I want to calculate the Akaikes Information Criterion (AIC).
I have found the formula for the AIC, at wikipedia
AIC = 2k - 2ln(L)
where k is the number of parameters used for the fit (in my case the length of C) and L is the maximum value of the likelihood function.
So my question is: how do I calculate the maximum value of the likelihood function ?
I have seen here that minimising the sum of the squares of the residuals (RSS), as I do above, is equivalent to maximising the likelihood function if the residuals are normally distributed.
But this does not mean that the RSS is equal to the likelihood function - or does it ?
Thanks in advance

回答 (1 件)

Vaibhav Awale
Vaibhav Awale 2016 年 5 月 3 日
Hi Rozh,
From the link that you have provided, it seems that maximum value of likelihood function will occur at minimum value of RSS. However, for calculating maximum value of likelihood from RSS, you will need to know the variance of the model as well.
Please refer to following documentation link which has MATLAB function 'aic', which is used to find Akaike's Information Criterion for estimated model.
I hope this helps.
Regards,
Vaibhav

カテゴリ

Help Center および File ExchangeNonlinear Control についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by