Generalized discrete Bayes with likelihood.
All my code in this chapter hard coded the computation of the likelihood inside the update() function, where it had no business. Also, my treatment of the likelihood was rather hand wavey. By pulling it out of update() and maing it explicit I have created a firm foundation for the rest of the book.
This commit is contained in:
@@ -35,7 +35,7 @@ if matplotlib.__version__ == '1.4.3':
|
||||
warnings.simplefilter(action="ignore", category=FutureWarning)
|
||||
|
||||
np.set_printoptions(precision=3)
|
||||
sys.path.insert(0, './code') # allow us to import book_format
|
||||
sys.path.insert(0, './code') # allow us to import code
|
||||
|
||||
def test_filterpy_version():
|
||||
|
||||
@@ -137,4 +137,3 @@ def load_style(directory = '.', name='code/custom.css'):
|
||||
|
||||
styles = open(os.path.join(directory, name), 'r').read()
|
||||
return HTML(styles)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user