User Tools

Site Tools


cs401r_w2016:lab2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cs401r_w2016:lab2 [2018/01/08 20:27]
wingated
cs401r_w2016:lab2 [2021/06/30 23:42] (current)
Line 20: Line 20:
 When you display your prior, likelihood, and posterior, your figure should look something like the ones in the book; my version is shown here: When you display your prior, likelihood, and posterior, your figure should look something like the ones in the book; my version is shown here:
  
-{{:​cs401r_w2016:​lab2_bayesian_concepts.png?​direct&​800|}}+{{:​cs401r_w2016:​lab2_plp.JPG?​direct&​800|}}
  
 Similarly, when you display the posterior predictive, your figure should look something like this: Similarly, when you display the posterior predictive, your figure should look something like this:
  
-{{:​cs401r_w2016:​lab2_pp.png?​direct&​800|}}+{{:​cs401r_w2016:​lab2_predpost.JPG?​direct&​800|}}
  
 ---- ----
Line 52: Line 52:
  
 <code python> <code python>
-prior = numpy.ones(( len(concepts), 1 ))+prior = numpy.ones(len(concepts))
 prior[0] = 5 prior[0] = 5
 prior[1] = 5 prior[1] = 5
-prior[2] = 5 +prior[30] = .01 
-prior[21] = 5+prior[31] = .01
 prior = prior / numpy.sum(prior) prior = prior / numpy.sum(prior)
 </​code>​ </​code>​
cs401r_w2016/lab2.1515443279.txt.gz · Last modified: 2021/06/30 23:40 (external edit)