# Machine Learning Algorithm Confusion

I made a small application about cricket prediction using Machine Learning. I took records of 10 years (2001-2011) of ODI matches and prepared a training set.

Now to predict a win or loss for a particular team, I considered various factors.

For example it is an India vs Australia match at Wankhede Stadium, India.

India’s record in past 10 years.

India’s record in past 2 years. (recent form)

India’s record in India in past 10 years.

India’s record in India in past 2 years. (recent form)

India’s record at Wankhede, past 10 years.

India’s record at Wankhede, past 2 years. (recent form)

Australia’s record in past 10 years.

Australia’s record in past two years.

Australia’s record against India in past 10 years.

Australia’s record against India in past 2 years.

Australia’s record against India in past 10 years in India.

Australia’s record against India in past 2 years in India.

So we took probabilities of all, Example, India played 322 matches in10 years and won 140, so the winning probability is 140/322 and so on for all the other factors. Now we added all the probabilities in the end and got a win loss percentage for both the countries. I wanted to know what kind of theorem is it. It started off as Naïve Bayes, but in Naïve Bayes we multiply the probabilities, unlike here. You can check the implementation here, http://www.manzarict.org/cricket We used basic PHP so that we could find probabilities faster using SQL queries. Now this might be a wrong approach to go about this sum, alternative methods are welcome.

• First, let me say that implementation is really nice! I'm a bit confused about the algorithm, though. How exactly did you add all those probabilities and not go over 1? I must be misunderstanding something. It seems to me that Naive Bayes would be just as easy in this situation. Did you try that and get strange results? – Matt May 6 '14 at 15:58
• Thanks @Matt. Umm, there were many cases where the probabilities were zero, for example, if Australia has not won any matches at the given stadium, it returns a zero, and this spoils Naive Bayes' results. Also Australia not winning any match at the given stadium is a very important factor. We calculated winning and losing factors, and divided the win by sum of win plus loss to get the percentage. – Kevin Desai May 6 '14 at 16:13
• What you describe is a heuristic, not a principled machine-learning algorithm. If this algorithm is 70% accurate that tells me that it is likely easy to be that accurate in this problem. Your method will probably not work well in general when compared to other methods. For instance, it is sensitive to adding distracting features (e.g., features that are essentially noise and have little predictive value) since you implicitly weight all the probabilities equally by simply summing them. So you might even see a decrease in performance when you add features. – MLS May 6 '14 at 18:08

For your second attempt, if you have variables that are not clearly dependent on each other, like: India’s record in past 10 years and India’s record in past 2 years, the obvious thing to try first may be Naive Bayes. You are right, the 0's can become a pain but the solution is very easy: