Updated for filterpy 0.0.28

plot_gaussian() was deprecated because it was a poor name. Replaced
with plot_gaussian_pdf().
This commit is contained in:
Roger Labbe 2015-08-29 08:43:32 -07:00
parent 2546428641
commit 77801d65ec
4 changed files with 109 additions and 69 deletions

1
.gitignore vendored
View File

@ -10,5 +10,6 @@ book.ipynb
*.toc
book.pdf
book6x9.pdf
Kalman_and_Bayesian_Filters_in_Python6x9.pdf
Kalman_and_Bayesian_Filters_in_Python.pdf
book_files

View File

@ -778,9 +778,9 @@
}
],
"source": [
"from filterpy.stats import plot_gaussian\n",
"plot_gaussian(mean=1.8, variance=0.1414**2, \n",
" xlabel='Student Height')"
"from filterpy.stats import plot_gaussian_pdf\n",
"plot_gaussian_pdf(mean=1.8, variance=0.1414**2, \n",
" xlabel='Student Height')"
]
},
{
@ -794,7 +794,7 @@
"\n",
"This curve is not unique to heights - a vast amount of natural phenomena exhibits this sort of distribution, including the sensors that we use in filtering problems. As we will see, it also has all the attributes that we are looking for - it represents a unimodal belief or value as a probability, it is continuous, and it is computationally efficient. We will soon discover that it also other desirable qualities which we may not realize we desire.\n",
"\n",
"To further motivate you, recall the shapes of the probability distributions in the *Discrete Bayes* chapter. They were not perfect Gaussian curves, but they were similar, as in the plot below. We will be using Gaussians to replace the discrete probabilities used in that chapter!"
"To further motivate you, recall the shapes of the probability distributions in the *Discrete Bayes* chapter. They were not perfect Gaussian curves, but they were similar, as in the plot below. We will be using Gaussians to replace the discrete probabilities used in that chapter! Please note that eyeball comparisons of PDF curves is strongly discouraged, as humans have trouble estimating areas; CDFs are usually the preferred choice. "
]
},
{
@ -856,7 +856,7 @@
],
"source": [
"with figsize(y=3.):\n",
" plot_gaussian(mean=120, variance=17**2, xlabel='speed(kph)')"
" plot_gaussian_pdf(mean=120, variance=17**2, xlabel='speed(kph)')"
]
},
{
@ -939,7 +939,7 @@
],
"source": [
"from filterpy.stats import gaussian, norm_cdf\n",
"plot_gaussian(22, 4, mean_line=True, xlabel='$^{\\circ}C$')"
"plot_gaussian_pdf(22, 4, mean_line=True, xlabel='$^{\\circ}C$')"
]
},
{

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long