Rewrites for orthogonal version of eqns
The changes in the univariate chapter, where I derived the eqn for K continue to ripple through the chapters.
This commit is contained in:
parent
d6becd7428
commit
c268a09f5f
@ -546,7 +546,7 @@
|
||||
" \n",
|
||||
"The equation for Gaussian addition is derived by basic algebra. I assure you it is correct. Therefore it is reasonable to expect that if we are using Gaussians to model physical events, the results must correctly describe those events.\n",
|
||||
"\n",
|
||||
"Here is our implementation of the predict function, where `pos` and `movements` are Gaussian tuples:"
|
||||
"Here is our implementation of the predict function, where `pos` and `movement` are Gaussian tuples:"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1389,9 +1389,9 @@
|
||||
"\\hline\n",
|
||||
"\\text{Equation} & \\text{Implementation}\\\\\n",
|
||||
"\\hline\n",
|
||||
" x = L\\bar x & y = z - \\mu_z \\\\\n",
|
||||
" x = L\\bar x & y = z - \\bar\\mu \\\\\n",
|
||||
" & K = \\frac {\\bar\\sigma^2} {\\bar\\sigma^2 + \\sigma_z^2} \\\\\n",
|
||||
" & x = \\bar x + Ky \\\\\n",
|
||||
" & \\mu = \\bar \\mu + Ky \\\\\n",
|
||||
" & \\sigma^2 = \\frac {\\bar\\sigma^2 \\sigma_z^2} {\\bar\\sigma^2 + \\sigma_z^2} \\\\\n",
|
||||
"\\hline\n",
|
||||
"\\end{array}$\n",
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -79,7 +79,7 @@ def plot_track_ellipses(N, zs, ps, cov, title):
|
||||
plt.show()
|
||||
|
||||
|
||||
def show_residual_chart():
|
||||
def show_residual_chart(show_eq=True, show_H=False):
|
||||
est_y = ((164.2-158)*.8 + 158)
|
||||
|
||||
ax = plt.axes(xticks=[], yticks=[], frameon=False)
|
||||
@ -105,10 +105,15 @@ def show_residual_chart():
|
||||
plt.text (1.0, 164.4, r"measurement ($z$)",ha='center',va='bottom',fontsize=18,color='blue')
|
||||
plt.text (0, 157.8, r"posterior ($x_{t-1}$)", ha='center', va='top',fontsize=18)
|
||||
plt.text (1.02, est_y-1.5, "residual($y$)", ha='left', va='center',fontsize=18)
|
||||
plt.text (1.02, est_y-2.2, r"$y=z-\bar x_t$", ha='left', va='center',fontsize=18)
|
||||
if show_eq:
|
||||
if show_H:
|
||||
plt.text (1.02, est_y-2.2, r"$y=z-H\bar x_t$", ha='left', va='center',fontsize=18)
|
||||
else:
|
||||
plt.text (1.02, est_y-2.2, r"$y=z-\bar x_t$", ha='left', va='center',fontsize=18)
|
||||
plt.text (0.9, est_y, "new estimate ($x_t$)", ha='right', va='center',fontsize=18)
|
||||
plt.text (0.8, est_y-0.5, "(posterior)", ha='right', va='center',fontsize=18)
|
||||
plt.text (0.75, est_y-1.2, r"$\bar{x}_t + Ky$", ha='right', va='center',fontsize=18)
|
||||
if show_eq:
|
||||
plt.text (0.75, est_y-1.2, r"$\bar{x}_t + Ky$", ha='right', va='center',fontsize=18)
|
||||
plt.xlabel('time')
|
||||
ax.yaxis.set_label_position("right")
|
||||
plt.ylabel('state')
|
||||
@ -233,6 +238,7 @@ def show_x_error_chart(count):
|
||||
stats.plot_covariance_ellipse ((5,5), ellipse=e3, variance=sigma,
|
||||
edgecolor='r', alpha=0.25)
|
||||
stats.plot_covariance_ellipse (m4[:,0], ellipse=e4, variance=sigma)
|
||||
plt.ylim((-9, 16))
|
||||
|
||||
#plt.ylim([0,11])
|
||||
#plt.xticks(np.arange(1,4,1))
|
||||
|
@ -1,7 +1,7 @@
|
||||
#! /bin/bash
|
||||
|
||||
#echo "merging book..."
|
||||
python merge_book.py
|
||||
ipython merge_book.py
|
||||
|
||||
echo "creating pdf..."
|
||||
ipython nbconvert --to latex --template book book.ipynb
|
||||
|
@ -1,4 +1,4 @@
|
||||
python merge_book.py
|
||||
ipython merge_book.py
|
||||
|
||||
ipython nbconvert --to latex --template book book.ipynb
|
||||
ipython to_pdf.py
|
||||
|
@ -49,6 +49,5 @@ if __name__ == '__main__':
|
||||
'../14-Adaptive-Filtering.ipynb',
|
||||
'../Appendix-A-Installation.ipynb',
|
||||
'../Appendix-B-Symbols-and-Notations.ipynb',
|
||||
#'../Appendix-C-Walking-Through-KF-Code.ipynb',
|
||||
'../Appendix-D-HInfinity-Filters.ipynb',
|
||||
'../Appendix-E-Ensemble-Kalman-Filters.ipynb'])
|
||||
|
Loading…
Reference in New Issue
Block a user