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.

  • $\begingroup$ 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? $\endgroup$ – Matt May 6 '14 at 15:58
  • $\begingroup$ 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. $\endgroup$ – Kevin Desai May 6 '14 at 16:13
  • $\begingroup$ 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. $\endgroup$ – MLS May 6 '14 at 18:08

There are many problems here. The main issues are on adding and multiplying probabilities. You can have a read of this. Hopefully the errors will become self-evident. The concepts to bear in mind are dependence/independence and mutual exclusivity.

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:

If a given class and feature value never occur together in the training data, then the frequency-based probability estimate will be zero. This is problematic because it will wipe out all information in the other probabilities when they are multiplied. Therefore, it is often desirable to incorporate a small-sample correction, called pseudocount, in all probability estimates such that no probability is ever set to be exactly zero. This way of regularizing naive Bayes is called Additive smoothing when the pseudocount is one, and Lidstone smoothing in the general case.

  • $\begingroup$ I agree to what you've said. But the approach I use currently is giving me promising results. I predicted 20 matches and it gave me a 70% accuracy. I'll still give a look to regularizing Naive Bayes. $\endgroup$ – Kevin Desai May 6 '14 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.