Text Recognition
Probabolistic classification
In the previous topic, we examined classification of data where there are generally clear lines to separate categories and a high degree of accuracy. Unfortunately, the real world is often messier than that and requires more estimation to determine properties of data.
The probability you have learned this year and in previous maths courses is referred to as ‘theoretical probability’ where you calculate the likelihood that an event should happen. When working on machine learning this can often differ widely from actual results and so instead we focus on ‘empirical probability’ based on the data you are given.
Naive Bayes
Decision-making probabilities will often take the form:
Where you are given a property, , of the data object and asked to determine the likelihood of hypothesis .
Using Bayes more formally, you are given a set of classes where is used to denote with input feature .
Each part of the Bayes equation is labelled below:
Practical calculations
When using this in practical calculations, there are two directions of thought. In order to compute the denominator of the above fraction you can use:
Where these values should be more or less provided to you in the data. is the number of samples found in that category divided by the total number collected and is simply 1 over the number of categories.
However, an important observation is that:
This means that if you are asked to find the posterior probabilities then you need to do the full calculation to determine the answer. However, if a question only asks you to determine which class a data object will be in based on the data then you can do two much simpler calculations and then just compare which one is higher.
This Bayes method gives the minimum error rate and it is often referred to as either:
- Minimum error rate classification
- Maximum posterior probability decision rule
Identifying spam
One major application of probabilistic classification is the identification and prevention of spam emails.