Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dynare
particles
Commits
30540e39
Commit
30540e39
authored
Jun 01, 2016
by
Frédéric Karamé
Browse files
Modification of a structure name when calling incremental_weights.
parent
a9800bef
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/gaussian_mixture_filter.m
View file @
30540e39
...
...
@@ -294,7 +294,7 @@ for t=1:sample_size
StateParticles
=
bsxfun
(
@
plus
,
StateMuPost
(:,
i
),
StateSqrtPPost
(:,:,
i
)
*
nodes
'
)
;
IncrementalWeights
=
gaussian_mixture_densities
(
Y
(:,
t
),
StateMuPrior
,
StateSqrtPPrior
,
StateWeightsPrior
,
...
StateMuPost
,
StateSqrtPPost
,
StateWeightsPost
,
...
StateParticles
,
H
,
const_lik
,
ReducedForm
,
ThreadsOptions
)
;
StateParticles
,
H
,
const_lik
,
weights
,
weights_c
,
ReducedForm
,
ThreadsOptions
)
;
SampleWeights
(
i
)
=
sum
(
StateWeightsPost
(
i
)
*
weights
.*
IncrementalWeights
)
;
end
SumSampleWeights
=
sum
(
SampleWeights
)
;
...
...
@@ -312,7 +312,8 @@ for t=1:sample_size
StateParticles
=
importance_sampling
(
StateMuPost
,
StateSqrtPPost
,
StateWeightsPost
'
,
number_of_particles
)
;
IncrementalWeights
=
gaussian_mixture_densities
(
Y
(:,
t
),
StateMuPrior
,
StateSqrtPPrior
,
StateWeightsPrior
,
...
StateMuPost
,
StateSqrtPPost
,
StateWeightsPost
,
...
StateParticles
,
H
,
const_lik
,
ReducedForm
,
ThreadsOptions
)
;
StateParticles
,
H
,
const_lik
,
1
/
number_of_particles
,
...
1
/
number_of_particles
,
ReducedForm
,
ThreadsOptions
)
;
SampleWeights
=
IncrementalWeights
/
number_of_particles
;
SumSampleWeights
=
sum
(
SampleWeights
,
1
)
;
SampleWeights
=
SampleWeights
.
/
SumSampleWeights
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment