The Bayesian Approach

For the people, who are unaware of , there are two approaches to Probability. I studied about these in the math courses in my Undergrad, but was never told of these being two different approaches to probability theory. Alas!!

1) The Classical Approach (also called the frequentist view)

2) The Bayesian Approach (also called the subjectivist view)

I shall be talking about the latter.. (as it is the one used in Machine Learning! and also my personal favourite :) )

The essence of the Bayesian approach to Probability:

You believe that you like a person. You don’t know how much you like him/her. The actions of the person towards you affect your liking or the belief (your belief that you like the person) you have towards him/her. This is common-sense. The beauty of the Bayesian principle lies in, encoding/representing the above common-sense fact using math.

An important thing one should be keeping in mind is that the Bayesian approach to Probability talks about ‘your’ beliefs on a subject. My belief about the Tajmahal is great. Another person’s might not be the same. This is the main difference when compared with the classical approach.

A simple example to explain the difference between the classical and the bayesian view is: Let us take the usual coin-tossing experiment. I toss a coin a 100 times, and then set out to estimate the probability of getting a heads when i toss it the 101th time.

1) Classical approach: You take a note of the number of times heads has appeared in all these 100 flips and then find the probability of getting heads by using: (No.of heads appeared)/(Total times the coin has tossed). You use this value for your future experiments saying that, in my first 100 coin tosses, i got heads 60 times (say), so the 101th time when I toss a coin, there is chance of getting a head than a tail!

2) Bayesian approach: Your aim of this experiment is not to know the probability of a coin showing heads in your first 100 tosses, but to know what might the coin show on the 101th toss or on the tosses later. Well, in this case the probability as obtained by these 2 methods might be the same, but your approach of seeing things is what that matters most.

Say, you have a belief that the coin shows tails. Now with every toss of the coin showing tails, you increase this belief or yours, and with every occurrence of a head, you decrease your belief. (You increase your likeliness about a person, for every nice thing he/she does towards you…isn’t it?) This is the Bayesian view of seeing things.

P(coin = tails|E) = P(E|coin = tails) * P(coin = tails)/P(E) <– the bayes theorem.

P(coin = tails) — Your initial belief that the coin shows tails.

P(E|coin = tails) — Now, given you believe that the coin shows tails, you test that against the Experiment, E. If in this test of yours, if you notice that the coin is infact showing tails, then your belief, P(coin = tails|E) gets increased.

(because, P(coin=tails | E) is proportional to P(E|coin = tails)*P(coin = tails) , from the above equation.)

You obtain the final value after completing the experiment. Now, based on this value you might take decisions on the future tosses.

Remember the word ‘belief’ is synonymous with ‘probability’ when u see things in bayesian perspective.

The coin-tossing experiment might not be a very good example to differentiate the bayesian and classical approaches.. I’ll try to give a better insight into this issue sometime later when it is being discussed with some machine learning problem. Just know that there are different views of seeing things, and the latter is the convenient one. It is convenient because it represents a common-sense/reality fact.

The Bayesian view is very very useful when dealing with Machine Learning stuff. and I’m a Bayesian. :)

#A good explanation on Bayesian philosophy. And there are many more!

(Abridged contents from "The Bayesian" by Vinay Gryffindor)

Posted bySandeep Sekharamantri at 1:48 PM 0 comments  

Random Rambling

Life seems to be on the run. Just a month ago I used hog like a horse and slumber like a sloth all through the lovely week and go out to explore the countryside (or whatever was left of it in coimbatore) on the weekends. Now I lead a friday to monday life. The rest of the time just flies by.

Wake up on a monday morning with those legendary monday blues at about 8am. Get ready and go through the rush hour to office. The next thing worth mentioning is the beer bash on friday. The missing pieces in between are filled by me sitting in front of a computer, me drinking coffee and me banging my head all the time trying to figure out how in pluto's name do these software professionals survive, let alone make millions by just kutting all day long!!!

I had had enough of the software life. One full year filled with copied codes, reproduced assignments and sloppy professors. I expected the industry to be a lot better considering that we Indians make a lot of dollars doing IT development. And the industry was an awesome experience, at least in the beginning. I walked into NetApp to a great welcome. My manager walked with me upto my cubicle which already had my name plate on it. I had a free laptop with internet. New found friends took me to the pantry where food was free. I was told that on fridays beer was served, free ofcourse. The software industry employs some of the best looking girls too. And for a rough and hardened mechite like me this was paradise. I totally freaked out the first few days utilising every freebie that I could get. But suddenly I realised that I missed something amidst the partying. THE WORK!. What exactly do these software guys do to live that way? Well, they just code and code and code and more code!

In BITS I heard my computer science 'engineering' friends talk about development work happening in the MNC's in the nation and felt that they would be working at the fore-front of cutting edge computer science technology someday soon. They also talked about something called "testing" in a much demeaning way and I got the impression that it was just people putting in x=1 and x=0 to test whether a code is working or not.

Indeed even within the industry I found 'engineers' talk the same way about development and testing jobs. But soon I realised that these so called engineers do the same things, whether its development or testing, whether he's a fresher or a manager with 30years experience. They all do the same things. They all code and code and code! The interface might change, the exterior might change, the pay package might change, their timings can change, but their core work does not. They just code.

Well, 1 month into my internship and I have firmly decided never to go back to a pure software industry and work with software 'engineers' (they love that term in these companies!)

Engineering, in my opinion, is the useful manipulation of the laws of nature. Engineering has physics as its most fundamental building block. And that is how we were taught in school. If you are good in physics you can become an engineer. A computer science problem, even in its most primitive basic format cannot be remotely related to physics and hence it cannot be related to engineering.

I got into a little trouble when I started discussing this angle with my manager and asked him why he was not called a computer scientist instead of a software engineer!!

I am happy that I made a job with a core manufacturing firm where they have real engineers who practice engineering in the real sense of the term.

The trouble with living life from friday to monday is that you get these niggling seconds in between your orkut and free juices where you let your thoughts ramble randomly. And when you sit down to write a blog at the first chance you get, you are lost and those random sentiments desist to form a chorus. What results is this aphrodisiac poop that you have just read.

Posted bySandeep Sekharamantri at 10:49 PM 4 comments  

My first instruction!!

Getting settled in your cube or office
If there is no chair, borrow one from a conference room. Then contact the Workplace Resources people; they will get you a less fancy but more adjustable one. It may take them several days though. If your conference room chair disappears in the meantime, just go borrow another one. You have the right to sit down.
If you don't have a computer yet, twiddle your thumbs a few times, then go to lunch. In NB, there is the food court, but it's kind of doubtful, although the restaurants on the upper floors are ok. Better yet, wherever you are, just ask your co-workers to suggest a place to eat. Or look for write-ups of local eateries on the web. If all else fails, get in your car and drive around aimlessly.
If there is no name tag on your cubicle, just wait. One will show up in a week or two. If you just can't wait, ask your manager to ping the process.

I guess working in a new company has its advantages!

Posted bySandeep Sekharamantri at 4:44 PM 0 comments  

A wonder!

A blind boy is walking down the street distributing small yellow pamphlets shounting out loudly " मुझे वोट दो".

My first impression was that it was an ad-film made to create awareness about the blind and their ascendency to normal life.

The boy slowly moves his hand over the eaflet and it shows a pencil sketch of the Taj Mahal.

सुना है कि बहुत सुंदर है।

please वोट दिजियेना।

What is it about this national craze, even international media frenzy, that is creating such moving ads? Can a monument made by a lover in memory of his love capture the imagination of a nation like never before? Is it really a national symbol?

A national symbol unites the people in a way that no other can. It is a solidarity, constituted by the feeling of the sacrifices one has made in the past and of those that one is prepared to make in the future.

Take national anthem, for example, sung on national holidays. No matter how banal the words and the tune we sing it in, there is in this singing an experience of simultaneity. At precisely such moments, people completely unkown to each other utter the same verses to the same melody. The image: resonance, the echoed physical realisation of the one community. How selfless this resonance feels.

Can a monument like the Taj achieve something remotely similar to such a feeling?

Whenever a foriegner thinks of India, he thinks of snake charmers, elephants and the Taj. An international dignitary always takes time off his busy schedule to visit the taj. Its globally acknowledged that the Taj is considered the symbol of love, the ultimate tribute to any human emotion. An edifice that epitomises an expression that is natural to every human being. It is this poignant intercourse of sentiment with marble that sets the Taj apart from any other monument.

The world is in its awe. Poets are praising it, minstrels singing of it, psychologists getting deep about it, boys and girls dreaming of it. Billboards selling it, industries built on it, kings and queens and streetsweepers hot in its pursuit.

This country has one chance to make all this sustain forever. It is this chance to enlist the Taj as one of the new seven wonders of the world. If voting is required to prove its worth, then so be it. We as a nation of a billion should be happy to see the Taj i a place where it actualy belongs.

These are the exact feelings one gets when he thinks of the new seven wonders campaign. This is another such moment when a person wholly unkown to you ponders over the same feelings. He wants his national sysmbol to be respected by the international community.

I have never seen the Taj for real in my life so far.

सुना है कि बहुत सुंदर है।
please वोट दिजियेना




Vote here

or sms TAJ to 4567

Posted bySandeep Sekharamantri at 5:46 PM 3 comments  

The moments that defined me

This is where it all begins.....my BITSian life!



A trip of epic proportions A trip that brought out more stories in a single fortnight than the rest of my BITSian life put together. The credit goes to Maddy and MLM travels.




The "Kukka" posh b'days!!!









Few of the best B'day celebs happened in this hallowed wing.

The last trip with the wing as a WHOLE!


A generation awakens



The most amazing assoc grubs




The festivals

Diwali in 2nd year , Rakhi in 3rd year


The one thing that I truly LEARNED in BITS....CATIAv5R14



The BEST thing that ever happened in my BITSian life, my wingies!!!





My most favourite place in BITS



A thousand memories!!!


TORQUE- Bend your minds for a Moment


Times, when they were good!

Times, when they got better!

My BITSian life at its ZENITH!

One day I shall lead them all!

The best juniors a senior can ever hope for


Psenti-SEM!!!


The Pillars of my BITSian Life




The fruits of my four year labour

Presenting

Sekharamantri Ratna Sandeep

BE (Hons) Mechanical

BE (Hons) Computer Science

Posted bySandeep Sekharamantri at 5:43 PM 4 comments  

गूगल हिंदी

मैंने देखा कि ये गूगल का नया अविष्कार है।

ये तो बढिया है।

ये नयी यन्त्र machine learning कि सहायता से काम कर्ता है।

मैंने इसे अभी अभी देखा है और सोचा क्यों ना इसे मैं आजमा के देखू ।

इस चीज़ ने थो मुझे बहोत खुश कर दिया है ।

गूगल हिंदी रोक्ज़!!!

Posted bySandeep Sekharamantri at 12:57 PM 0 comments  

When the end is near, why do I crave for the begining

Sandy's one line status message sums it up aptly. The end is approaching, and I hope to wake up from my dream in my first year and start all over again!

This what I see in the status messages everyday in my gtalk. Ofcourse, there is that occassional "Last one month in this God forsaken place" and a little more of blasphemy, but that is just an expresion of anguish at the system which is stubborn enough to test us even in the ultimate month of our union at BITS Pilani.

I have no idea why I felt like this today, but if I had a chance to go back and start from the begining, I would love to go back in time and do it exactly the same as I had done in the past four years.

Lots of meomries......I guess i shall organise them one day soon !

Posted bySandeep Sekharamantri at 6:41 PM 2 comments