Posts

Showing posts from November, 2014

kmeans++

The kmeans algorithm is one of the most popularly used algorithms in clustering. However, one of the main problem of the algorithm is the initialization of the seed points. Random initializations is generally used and it can sometimes lead to a clustering arbitrarily worse than the optimal clustering. Further it can cause much slower convergence to the final result. The kmeans++ algorithm comes to our rescue in such cases. The kmeans++ paper was published in 2007 and so far has more than 850 citations. It provides a very cute method to initialize kmeans. The idea is as follows: Instead of picking up random cluster centres, how about picking the farthest point from the chosen cluster centres ? The problem with this approach is that it will result in picking up outliers as cluster centres. Instead, we want to pick cluster centre from the next dense group of points. So here are the two steps for the algorithm - Pick the first cluster center at random. Choose the subsequent cluster c

Multi Armed Bandit (MAB)

Hola, I'm back! Was on a hiatus post baby and now I will try to write more regularly. So, lets get started. The multi-armed bandit problem was formulated in the 50s and is as follows: Suppose there are N slot machines (arms) and the player has to decide which machine to play. Each machine has an unknown probability of distributing a reward and the player has to decide which machines to play and in what order in order to maximize the reward. Note that the probability of reward generation of each machine is unknown otherwise the reward is maximized by simply picking up the machine with the largest probability. This problem has huge applications. For example, ad recommendation, news recommendation, in a clinical trial while trying to come up with the best treatment or in the portfolio management of the stocks. The problem of choosing the best arm is complicated by the stochastic nature of the slot machines. A sub-optimal machine could generate a reward by random chance and similarly