Lesson 4 of 21By Simplilearn
Last updated on Mar 5, 20214536A common job of machine learning algorithms is to recognize objects and being able to separate them into categories. This process is called classification, and it helps us segregate vast quantities of data into discrete values, i.e. :distinct, like 0/1, True/False, or a pre-defined output label class.
In this article titled âEverything you need to know about Classification in Machine Learningâ, you will learn about classification, and the following topics too:Â
Before we dive into Classification, letâs take a look at what Supervised Learning is. Suppose you are trying to learn a new concept in maths and after solving a problem, you may refer to the solutions to see if you were right or not. Once you are confident in your ability to solve a particular type of problem, you will stop referring to the answers and solve the questions put before you by yourself.
This is also how Supervised Learning works with machine learning models. In Supervised Learning, the model learns by example. Along with our input variable, we also give our model the corresponding correct labels. While training, the model gets to look at which label corresponds to our data and hence can find patterns between our data and those labels.
Some examples of Supervised Learning include:
We can further divide Supervised Learning into the following:
 Figure 1: Supervised Learning Subdivisions
Classification is defined as the process of recognition, understanding, and grouping of objects and ideas into preset categories a.k.a âsub-populations.â With the help of these pre-categorized training datasets, classification in machine learning programs leverage a wide range of algorithms to classify future datasets into respective and relevant categories.
Classification algorithms used in machine learning utilize input training data for the purpose of predicting the likelihood or probability that the data that follows will fall into one of the predetermined categories. One of the most common applications of classification is for filtering emails into âspamâ or ânon-spamâ, as used by todayâs top email service providers.
In short, classification is a form of âpattern recognition,â. Here, classification algorithms applied to the training data find the same pattern (similar number sequences, words or sentiments, and the like) in future data sets.
We will explore classification algorithms in detail, and discover how a text analysis software can perform actions like sentiment analysis - used for categorizing unstructured text by opinion polarity (positive, negative, neutral, and the like).Â
           Figure 2: Classification of vegetables and groceries
Figure 3 : Bayesâ Theorem
         Where :
         P(A | B) = how often happens given that B happens
         P(A) = how likely A will happen
         P(B) = how likely B will happen
         P(B | A) = how often B happens given that A happens
                      Figure 4: Decision Tree
In the above figure, depending on the weather conditions and the humidity and wind, we can systematically decide if we should play tennis or not. In decision trees, all the False statements lie on the left of the tree and the True statements branch off to the right. Knowing this, we can make a tree which has the features at the nodes and the resulting classes at the leaves.
Figure 5: Data to be classified
       Â
                    Figure 6: Classification using K-Nearest NeighboursÂ
To evaluate the accuracy of our classifier model, we need some accuracy measures. The following methods are used to see how well our classifiers are predicting:
The predicted labels are then compared to the actual labels and accuracy is found out seeing how many labels the model got right.
                                                   Figure 7: Bias
We can define variance as the modelâs sensitivity to fluctuations in the data. Our model may learn from noise. This will cause our model to consider trivial features as important. When the Variance is high, our model will capture all the features of the data given to it, will tune itself to the data, and predict on it very well but new data may not have the exact same features and the model wonât be able to predict on it very well. We call this Overfitting.
                        Figure 8: Example of VarianceÂ
     Where :
            TP = True Positives, when our model correctly classifies the data point to the class it belongs to.
            FP = False Positives, when the model falsely classifies the data point.
            Recall is used to calculate the ability of the mode to predict positive values. But, "How often does the model predict the correct positive values?". This is calculated by the ratio of true positives and the total number of actual positive values.                                          Â
Acelerate your career in AI and ML with the Post Graduate Program in AI and Machine Learning with Purdue University collaborated with IBM.
In this article - Everything you need to know about Classification in Machine learning, we have taken a look at what Supervised Learning is, and its sub-branch Classification, and also learned about some of the classification models which are commonly used and how to predict the accuracy of those models and see if they are trained perfectly. Hopefully, you now know everything you need about Classification!Â
Was this article on Classification useful to you? Do you have any doubts or questions for us? Mention them in this article's comments section, and we'll have our experts answer them for you at the earliest!Â
Simplilearn is one of the worldâs leading providers of online training for Digital Marketing, Cloud Computing, Project Management, Data Science, IT, Software Development, and many other emerging technologies.
An Introduction to the Types Of Machine Learning
Machine Learning Career Guide: A complete playbook to becoming a Machine Learning Engineer
Course Announcement: Simplilearnâs Machine Learning Certification Training
Program Preview: Post Graduate Program in Digital Marketing
Machine Learning Tutorial
Introduction to Machine Learning: A Beginner's Guide