def nll(self, r):
"""Get the nll score of assigning a measurement to the filter."""
zhat, H = r.mfn(self.x)
dz = r.z - zhat
S = H @ self.P @ H.T + r.R
score = dz.T @ inv(S) @ dz / 2.0 + ln(2 * pi * sqrt(det(S)))
return float(score)
评论列表
文章目录