Supervised Machine Learning
In supervised learning, the algorithm is trained on labeled dataset, where each data point has a corresponding label or output value. The algorithms learns to map the input data to the desired output.
Example: Consider House-Rent Prediction dataset from below table, in which we have features such as BHK, size, floor, area type, area locality, city, furnishing status, tenant preferred, bathroom, point of contact and rent.
From this dataset we can easily find what are inputs(features) and what are output(target variable). Here features are all columns except Rent
and our target value is Rent
.
Types of Supervised Algorithms
Supervised machine learning can be broadly classified into two main types based on the nature of the target variable.
1. Classification
It predicts the categorical label (i.e., text values) or discrete class labels. For example, in email spam detection, there are two output labels to determine whether email is spam or not spam. Another example, is disease diagnosis where we can predict whether there is 'disease' or 'no disease'.
the algorithms used for classification type are Logistic regression, Random Forest, SVM, Decision tree, and KNN
Example: spam or not spam, yes or no, truth or false etc.
2. Regression
It predicts the continuous numerical value. Example, house price prediction where the sales price of a house is continuous and sometimes the price can be higher or lower and these are numerical values. Similar example is stock market trends, weather forecasting etc.
The algorithms for this type are Linear regression, Ridge regression, Lasso regression, Polynomial regression, Random Forest, and SVM.
Applications of Supervised ML
There are many supervised learning applications that we use in our day-to-day life and some of them are:
- Email Spam detection: Identify emails whether emails are spam or not spam. The common algorithms used were Naive Bayes, and SVM.
- House price Prediction: Predict the price of a house based on its features. The commonly used algorithms were Linear Regression, Decision Tree, Random Forest.
- Fraud detection: Identify fraudulent transactions or activities. Algorithms used for this type of problem were Random Forest, and SVM.
- Weather Forecasting: We can predict future weather conditions using supervised machine learning. This is time-series forecasting model and the algorithms used for this type are Linear Regression, and LSTM.
- Natural language processing: We can extract information from text, such as sentiment, named-entities, and relationships. Most common algorithms used were word-embeddings, TF-IDF or word2vec.