Supervised Learning : A machine learning approach where algorithms learn from labeled data . The objective is to train the algorithm to predict accurate labels for new, unseen data.
Whats labeled data ?
Labeled data - it contains examples of both inputs (called features) and correct outputs (labels). Ex: Spam filters: Email services use datasets of emails message (feature) labeled as "spam" or "ham" to train their spam detection algorithms.
Labeled data (spam/ham)
Supervised learning in machine learning is generally divided into two categories: Classification and Regression.
Classification algorithms are used to group data by predicting a categorical label or output variable based on the input data.
Types of classification algorithm
Binary Classification: Classify the input data into two mutually exclusive categories.The training data in such a situation is labeled in a binary format: true and false; positive and negative; O and 1; spam and not spam, etc.
Popular algorithms for binary classification
Logistic Regression : Is a class of regression where the independent variable is used to predict the dependent variable .
Use Case : Determine the probability of heart attacks of a patient . With the help of a logistic model, medical practitioners can determine the relationship between independent variables: such as the weight, age,exercise, etc., of an individual and use it to predict whether the person will suffer from a dependent variable (yes/no) heart attack .
Logistic Regression
Decision Tree : Its a decision support hierarchical model that uses a tree-like model of decisions and their possible consequences.
Use Case : Build and AI generated loan approval system . Result of loan approval decision tree is a simple "yes" or "no" output. But many data points can feed into that final decision, including the applicant's credit score, employment history, current financial situation,age,previous any default loan and more
Decision Tree
Multi-Class Classification : Classify the input data into three or more categories. Assumption is that each sample is assigned to one and only one label.
Popular algorithms for binary classification
Naive Bayes classifier: It's a probabilistic machine learning model .
Use Case: Classify a set of images of fruits which may be oranges, banana, or others. Use naive bayes classifier,It is not a single algorithm but a family of algorithms where all of them share a common principle.Every pair of features being classified is independent of each other.
Every pair is classified indivually
Multi-Label Classification: Classify the input data from a dataset where multiple nonexclusive labels may be assigned to each instance Popular algorithms for binary classification
Neural Network : Allow programs to recognize patterns and solve common problems in machine learning .
Use Case: Classify a an image that contains multiple objects , it can be fruit, vehicle, animal,human . Use Feed-forward neural networks (FNN) that are composed of an input layer, hidden layers, and an output layer.The input layer consists of neurons that receive input from the outside world. The hidden layers consist of neurons that learn to recognize patterns in the data
2. Regression :It is a supervised machine learning technique which is used to predict continuous values. The ultimate goal of the regression algorithm is to plot a best-fit line or a curve between the data. The three main metrics that are used for evaluating the trained regression model are variance, bias and error. For the model to be accurate, bias needs to be low.
Linear regression : It assumes a linear relationship between one independent variables and one dependent variable Use Case: Predict housing prices based (y)on feature like square feet (x)
Linear Regression x= independent y=dependent
Multiple linear regression is used to estimate the relationship between two or more independent variables and one dependent variable. y = m1x1 + m2x2 + … + MnXn + c y=independent variable, x1=dependent variable ,m1=regression coefficients Use Case: Predict housing prices based (y) on features like area , bedroom,bathroom stories parking etc
Sample data for
will discus about UnSupervised Learning on my next article .