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
a9800bef
Commit
a9800bef
authored
Jun 01, 2016
by
Frédéric Karamé
Browse files
Fixed bug on structure name.
parent
af66ea9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/conditional_filter_proposal.m
View file @
a9800bef
...
...
@@ -105,7 +105,7 @@ if ParticleOptions.proposal_approximation.cubature || ParticleOptions.proposal_a
StateVectorVarianceSquareRoot
=
mat
(
number_of_observed_variables
+
(
1
:
number_of_state_variables
),
number_of_observed_variables
+
(
1
:
number_of_state_variables
));
Error
=
obs
-
PredictedObservedMean
;
StateVectorMean
=
PredictedStateMean
+
(
CovarianceObservedStateSquareRoot
/
PredictedObservedVarianceSquareRoot
)
*
Error
;
if
options_
.
particle
.
cpf_weights_method
.
amisanotristani
if
ParticleOptions
.
cpf_weights_method
.
amisanotristani
Weights
=
SampleWeights
.*
probability2
(
zeros
(
number_of_observed_variables
,
1
),
PredictedObservedVarianceSquareRoot
,
Error
)
;
end
else
...
...
@@ -119,14 +119,14 @@ else
StateVectorMean
=
PredictedStateMean
+
KalmanFilterGain
*
Error
;
StateVectorVariance
=
PredictedStateVariance
-
KalmanFilterGain
*
PredictedObservedVariance
*
KalmanFilterGain
'
;
StateVectorVarianceSquareRoot
=
chol
(
StateVectorVariance
+
1e-6
)
'
;
if
options_
.
particle
.
cpf_weights_method
.
amisanotristani
if
ParticleOptions
.
cpf_weights_method
.
amisanotristani
Weights
=
SampleWeights
.*
probability2
(
zeros
(
number_of_observed_variables
,
1
),
chol
(
PredictedObservedVariance
)
'
,
Error
)
;
end
end
PredictedStateVarianceSquareRoot
=
chol
(
PredictedStateVariance
+
1e-6
)
'
;
ProposalStateVector
=
StateVectorVarianceSquareRoot
*
randn
(
size
(
StateVectorVarianceSquareRoot
,
2
),
1
)
+
StateVectorMean
;
if
options_
.
particle
.
cpf_weights_method
.
murrayjonesparslow
if
ParticleOptions
.
cpf_weights_method
.
murrayjonesparslow
Prior
=
probability2
(
PredictedStateMean
,
PredictedStateVarianceSquareRoot
,
ProposalStateVector
)
;
Posterior
=
probability2
(
StateVectorMean
,
StateVectorVarianceSquareRoot
,
ProposalStateVector
)
;
Likelihood
=
probability2
(
obs
,
H_lower_triangular_cholesky
,
measurement_equations
(
ProposalStateVector
,
ReducedForm
,
ThreadsOptions
))
;
...
...
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