What is supervised learning?
Introduction
In the previous article, we talked briefly about Machine Learning, its categories and the toolkits necessary for its implementation. In this article, we will look into Supervised Learning in detail. We will be revisiting examples from the previous article to make the topic of Supervised Learning easy to understand.
What is supervised learning?
Supervised learning is a subcategory of machine learning where the algorithm is trained on a labeled dataset. By analyzing the dataset, the algorithm will derive patterns to make future predictions.
Supervised learning is like teaching a computer to learn from examples (Labeled Dataset). For example, you show the Computer 50 photos of Dogs( labeled dog photos) and 50 photos of Cats( Labeled as cat photos). The Supervised Machine Learning Algorithm goes through all the Dog photos and identifies the common patterns of a dog photo. A similar operation is done on the cat photo as well. The next time you show the computer a new picture of a cat or a dog, the algorithm will itself predict whether it’s a cat or a dog.
A similar technique is used in AI traffic violation cameras. Feed the computer 1000 images of person wearing a helmet (labeled data) and 1000 images of person not wearing a helmet (labeled data). The Supervised Machine Learning Algorithm will find common patterns in photos of person wearing a helmet and not wearing a helmet. Next time you show the computer a new picture of a person travelling on a bike, the algorithm will tell if the person is wearing a helmet or not.
Classification of Supervised Learning
There are two types of Supervised Learning: Regression and Classification.
Regression
In Regression, the algorithm will predict numerical values based on the input features given to it. Regression algorithms can be used for stock market prediction, Crop Yield Prediction, Real Estate valuation, etc. In all these examples, the output will be a numerical value.
Classification
In classification, the algorithm will predict a category based on the input features given to it. Classification algorithms can be used for disease diagnosis (predicting whether a patient has a disease or not), spam email detection (categorizing emails as “spam” or “not spam”), Credit Card Fraud Detection (categorizing them as “fraudulent” or “legitimate”), etc. In all these use cases, the output is a category or class.
Supervised Learning Algorithms
Now let us discuss some of the most commonly used supervised learning algorithms.
Linear regression
Linear regression is used to identify the relationship between a dependent variable and one or more independent variables1. That is to say, it will give a numerical prediction based on the input features given to it. As the name suggests, it is a regression algorithm. This algorithm is suitable for predicting house prices, stock prices, etc.
Logistic Regression
Logistic regression is used for binary classification problems. Unlike the name, this is a classification algorithm. It is well-suited for problems where the goal is to predict one of two possible outcomes. For instance, predicting whether a mail is spam or not.
Decision Tree
Decision tree algorithms create a treelike structure to make decisions based on input feature values. It can be used for both regression and classification. This algorithm is suitable for Customer segmentation, fraud detection, recommendation systems etc
Random Forest
Random Forest is a machine learning algorithm that builds multiple decision trees and combines their predictions to improve accuracy. It can be used for both classification and regression.
k-Nearest Neighbors (KNN):
KNN classifies data points based on the majority class of their k-nearest neighbors. In simple terms, KNN looks at nearby things to decide what something is. It can be used for both classification and regression.
Conclusion
In this article, we discussed about supervised learning algorithms, their classification and some commonly used examples. In the next article, we can discuss about Unsupervised Learning in detail.
Reference
1. What is supervised learning?. IBM. (n.d.). https://www.ibm.com/topics/supervised-learning