modification of the sufficient statistics in the auxiliary particle filter
parent
3b04e52667
commit
473b2b8bb1
|
@ -98,13 +98,21 @@ else
|
|||
end
|
||||
StateVectors = tmp(mf0,:) ;
|
||||
|
||||
%[nodes,nodes_weights] = spherical_radial_sigma_points(number_of_structural_innovations) ;
|
||||
[nodes,nodes_weights,nodes_weights_c] = unscented_sigma_points(number_of_structural_innovations,ParticleOptions);
|
||||
nodes = Q_lower_triangular_cholesky*nodes ;
|
||||
|
||||
for t=1:sample_size
|
||||
yhat = bsxfun(@minus,StateVectors,state_variables_steady_state);
|
||||
if pruning
|
||||
yhat_ = bsxfun(@minus,StateVectors_,state_variables_steady_state);
|
||||
[tmp, tmp_] = local_state_space_iteration_2(yhat,zeros(number_of_structural_innovations,number_of_particles),ghx,ghu,constant,ghxx,ghuu,ghxu,yhat_,steadystate,ThreadsOptions.local_state_space_iteration_2);
|
||||
else
|
||||
tmp = local_state_space_iteration_2(yhat,zeros(number_of_structural_innovations,number_of_particles),ghx,ghu,constant,ghxx,ghuu,ghxu,ThreadsOptions.local_state_space_iteration_2);
|
||||
% if pruning
|
||||
% yhat_ = bsxfun(@minus,StateVectors_,state_variables_steady_state);
|
||||
% [tmp, tmp_] = local_state_space_iteration_2(yhat,zeros(number_of_structural_innovations,number_of_particles),ghx,ghu,constant,ghxx,ghuu,ghxu,yhat_,steadystate,ThreadsOptions.local_state_space_iteration_2);
|
||||
% else
|
||||
% tmp = local_state_space_iteration_2(yhat,zeros(number_of_structural_innovations,number_of_particles),ghx,ghu,constant,ghxx,ghuu,ghxu,ThreadsOptions.local_state_space_iteration_2);
|
||||
% end
|
||||
tmp = 0 ;
|
||||
for i=1:size(nodes)
|
||||
tmp = tmp + nodes_weights*local_state_space_iteration_2(yhat,nodes(i,:)*ones(1,number_of_particles),ghx,ghu,constant,ghxx,ghuu,ghxu,ThreadsOptions.local_state_space_iteration_2);
|
||||
end
|
||||
PredictedObservedMean = weights*(tmp(mf1,:)');
|
||||
PredictionError = bsxfun(@minus,Y(:,t),tmp(mf1,:));
|
||||
|
|
Loading…
Reference in New Issue