Slightly different outcomes in the fminunc() function for matlab2022 compared to matlab 2017
5 次查看(过去 30 天)
显示 更早的评论
Hi,
We are currently switching from matlab version 2017a to 2022a. However, we get slightly different parameters (up to 6 decimals) with the following function:
[parameters,LL,exitflag,output]=fminunc('tarch_likelihood',startingvals_transformed,options,epsilon_augmented,fepsilon,fIepsilon,p,o,q,error_type,tarch_type,back_cast,T,1);
parameters (matlab 2017a): 1.29415540923115, -1.19100655789619
parameters (matlab 2022a): 1.294156237365114, -1.191008840253841
The inputs are exactly the same so it seems that optimizer in 2022a has changed. Does anyone know the exact reason for these different slightly different outcomes between the two matlab versions 2017a and 2022a?
0 个评论
回答(1 个)
Ganapathi Subramanian
2023-4-26
Hi Jeroen,
It is my understanding that you are using ‘fminunc’ and getting slightly different results in R2017a and R2022a. Many updates are present in each version of MATLAB. The usual issue is that the underlying math libraries can have slight differences. As optimization routines iterate, these differences get amplified. This is the reason behind the slight variation in your case.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!