?? tfarma_llfe.m
字號:
function l= tfarma_llfe(theta_AB, y, MAR, LAR, MMA, LMA, re_im)% function l= tfarma_llfe(theta_AB, y, MAR, LAR, MMA, LMA, re_im)% This file is part of the TFPM toolbox v1.0 (c)% michael.jachan@tuwien.ac.at and underlies the GPL.% % Computation of the NEGATIVE exact log-likelihood function of% Gaussian TFARMA(MAR, LAR; MMA, LMA; N; 1/2) models with% parameters theta_AB. Takes NO care of re_im! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%if(0)% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%clear;tfpm;N = 64;MAR = 2;LAR = 2;MMA = 1;LMA = 1;re_im= 'i';mo_no= 'n';tfpm_file_gen;%-------------beta = 1/2;theta_AB= [param_stack_ml(Aml(:, 2:end)); param_stack_ml(Bml)];e0= randn(N, 1);y= tfarma_gen(e0, Aml, Bml, beta);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%end;% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Dimensions:N= length(y);theta_A= theta_AB(1:MAR*(2*LAR+1));theta_B= theta_AB(MAR*(2*LAR+1)+1:end);Aml= [[zeros(LAR, 1); 1; zeros(LAR, 1)] param_destack_ml(theta_A, MAR-1, LAR)];Bml= param_destack_ml(theta_B, MMA, LMA);Bnm= param_expand(Bml, N);e= tfarma_inv(y, Aml, Bml);l= 2*sum(log(abs(Bnm(:, 1)))) + real(e'*e)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%if(0)% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Slow, exact reference:Anm= param_expand(Aml, N);Bnm= param_expand(Bml, N);H= tvarma_impr(Anm, Bnm);R= H*H';lref= log(real(det(R))) + real(y'*inv(R)*y);[l lref]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%end;% TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -