A couple years back, I was reading a blog post by Raganwald, where I read this quote:
A very senior Microsoft developer who moved to Google told me that Google works and thinks at a higher level of abstraction than Microsoft. “Google uses Bayesian filtering the way Microsoft uses the if statement,” he said. —Joel Spolsky, Microsoft Jet
That got me thinking very literally. What would it look like if we have probability statements to use natively like we have “if” statements? How would that change how we code? That would mean we could make decisions not just on the information we have on hand, but the prior information we saw before.
However, when implementing any machine learning code, you have to count and manipulate the samples yourself. I wrote Prolly so you can express probabilities that you want directly in code. So P(Color = blue) would be written as
Probabilities are generally easy, but can get harder as you write entropy and information gain. H(Color | Texture = rough) would be written as
I implemented a decision tree with it, but will implement naive bayes and an HMM with it later.