Modify the inputs of gaussian_density.
parent
fb39ee91cd
commit
3ffcb7b759
|
@ -1,4 +1,4 @@
|
|||
function IncrementalWeights = gaussian_densities(obs,mut_t,sqr_Pss_t_t,st_t_1,sqr_Pss_t_t_1,particles,H,normconst,weigths1,weigths2,ReducedForm,ThreadsOptions)
|
||||
function IncrementalWeights = gaussian_densities(obs,mut_t,sqr_Pss_t_t,st_t_1,sqr_Pss_t_t_1,particles,H,normconst,ReducedForm,ThreadsOptions)
|
||||
%
|
||||
% Elements to calculate the importance sampling ratio
|
||||
%
|
||||
|
|
|
@ -115,7 +115,7 @@ for t=1:sample_size
|
|||
gaussian_densities(Y(:,t),StateVectorMean,...
|
||||
StateVectorVarianceSquareRoot,PredictedStateMean,...
|
||||
PredictedStateVarianceSquareRoot,StateParticles,H,const_lik,...
|
||||
weights2,weights_c2,ReducedForm,ThreadsOptions) ;
|
||||
ReducedForm,ThreadsOptions) ;
|
||||
SampleWeights = weights2.*IncrementalWeights ;
|
||||
else
|
||||
StateParticles = bsxfun(@plus,StateVectorVarianceSquareRoot*randn(state_variance_rank,number_of_particles),StateVectorMean) ;
|
||||
|
@ -123,7 +123,7 @@ for t=1:sample_size
|
|||
gaussian_densities(Y(:,t),StateVectorMean,...
|
||||
StateVectorVarianceSquareRoot,PredictedStateMean,...
|
||||
PredictedStateVarianceSquareRoot,StateParticles,H,const_lik,...
|
||||
1/number_of_particles,1/number_of_particles,ReducedForm,ThreadsOptions) ;
|
||||
ReducedForm,ThreadsOptions) ;
|
||||
SampleWeights = IncrementalWeights/number_of_particles ;
|
||||
end
|
||||
SampleWeights = SampleWeights + 1e-6*ones(size(SampleWeights,1),1) ;
|
||||
|
|
Loading…
Reference in New Issue