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
Mark Song
particles
Commits
5b5e88b5
Commit
5b5e88b5
authored
Oct 06, 2015
by
Frédéric Karamé
Browse files
Modify the inputs of gaussian_density.
parent
93039cd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/gaussian_densities.m
View file @
5b5e88b5
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
%
...
...
src/gaussian_filter.m
View file @
5b5e88b5
...
...
@@ -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
)
;
...
...
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