Commit 99410ead authored by Michel Juillard's avatar Michel Juillard
Browse files

initialize cholHset in smoother

parent b683a776
......@@ -1057,6 +1057,7 @@ function kalman_filter_2!(Y::AbstractArray{U},
fill!(ws.lik, 0.0)
t = start
steady = false
cholHset = false
# copy!(ws.oldP, vP)
while t <= last
#inputs
......@@ -1091,17 +1092,17 @@ function kalman_filter_2!(Y::AbstractArray{U},
# F = Z*P*Z' + H
# builds also ZP
get_F!(vF, vZP, vZ, vP, vH)
info = get_cholF!(vcholF, vF)
if info != 0
# F is near singular
if !cholHset
info = get_cholF!(vcholF, vF)
if info != 0
# F is near singular
if !cholHset
get_cholF!(ws.cholH, H)
cholHset = true
end
ws.lik[t] = univariate_step!(Y, t, vZ, vH, vT, ws.QQ, a, P, ws.kalman_tol, ws)
t += 1
continue
cholHset = true
end
ws.lik[t] = univariate_step!(Y, t, vZ, vH, vT, ws.QQ, a, P, ws.kalman_tol, ws)
t += 1
continue
end
# end
# iFv = inv(F)*v
get_iF!(viF, vcholF)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment