A-Z Bayes - Part 2: Priorities Don't Matter

This is a follow up post to my previous blog post explaining the A-Z of bayes.

The argument that someone is using a 373-faced dice to produce the following

3, 4, 2, 5, 4, 6, 4, 7, 4

dice rolls is discussed in it.

The post could be summarized into the following steps

  1. Set the hypothesis space - \(H_i\)
  2. Set the prior probability of each hypothesis - \(P(H_i)\)
  3. Calculate the likelihoods of each hypothesis for the seen data - \(L(H_i)\)
  4. Report the posterior probabilities of each hypothesis - \(P(H_i)*L(H_i)\)

The prior probabilites show half the impact in reporting the posterior. That means, if someone does set a high prior probability for that hypothesis then it looks like the posterior probability will be high. Let’s see how the results work themselves out when we set the last hypothesis’ probability to 99.5%, leaving the other 0.5% shared by the other 29 hypotheses.

Stubborn priors result in...

The same posteriors

It’s almost funny how there’s still a 1.3% chance that it is a 29+ faced dice. But the drop from 99.5% after just 9 data points is a statement that with more data points the probability will go even low.

The bottom line is, priorities don't matter if there's enough evidence.

... continue reading ...

A to Z Bayes - Part 1: The Basics

Back in the days when neither of us were born, science was a pioneering concept destined to take humanity from the shore of darkness to light. The selling point was repeatability of experiments. Careful reproduction of experiments ensured that a lot of falsifiable theories stayed false. But, the method falls flat when there is an unfalsifiable hypothesis in picture. Science can never prove a hypothesis right, it can only prove it wrong. The ignorant - armed with this fact - use science to say:

“Evolution is just a theory. It could be God as well and you can’t prove me wrong!”.

If everything is ‘just a theory’ then which one is the right theory?

Take a dose of Bayes before sleep for sanity.
... continue reading ...

XOR using MultiLayered Perceptron

Historically, almost every non-tree based ML algorithm created only linear separable spaces, and the XOR simply cannot be modeled with them. Enter the multilayerd perceptron (MLP) and everything changed. With an elegant chaining of linear combinations of inputs we can obtain almost any number of linear decision boundaries. So I thought I’d bulid a robust XOR gate using a simple MLP

... continue reading ...

Barebones Git

Many people I know confuse Git with Github, and probably don’t have a good idea of what version control is. I guess, half the trouble with lies in the steep learning curve, not to mention how new and bizzare some concepts are. I’ve had my own million doubts before using Git and never knew where to start. Even if I did start, I’d have had given up on the second day not understanding why certain thing is the way it is.
This post is just for that, to de-mistify what a good tool Git is and how easy it is to integrate into the workflow and, really, master version controlling with only a handful of commands. I hope the days of copy-pasting a file in the name of ‘backup’ are a days of the past.

... continue reading ...