alex_zag_al comments on Priors as Mathematical Objects - Less Wrong
You are viewing a comment permalink. View the original post to see all comments and the full post content.
You are viewing a comment permalink. View the original post to see all comments and the full post content.
Comments (19)
Can someone please provide a hint how?
Here's some Python code to calculate a prior distribution from a rule for assigning probability to the next observation.
A "rule" is represented as a function that takes as a first argument the next observation (like "R") and as a second argument all previous observations (a string like "RRWR"). I included some example rules at the end.
EDIT: oh man, what happened to my line spacing? my indents? jeez.
EDIT2: here's a dropbox link: https://www.dropbox.com/s/16n01acrauf8h7g/prior_producer.py
And here's some examples of functions that can be used as the "rule" arguments.