Unit 4.1-2
Unit 4.1-2
✓ Image classification
✓ Natural language processing
✓ Speech recognition
✓ Recommendation systems
✓ Predictive analytics
✓ Medical diagnosis
✓ Fraud detection
✓ Autonomous vehicles
✓ Email spam detection
✓ Credit scoring
✓ Gaming
✓ Weather forecasting
✓ Sports analytics
There are two main categories of supervised
learning that are mentioned below:
Classification
✓ Deals with predicting categorical target
variables, which represent discrete classes or
labels.
✓ For instance, classifying emails as spam or not
spam, or predicting whether a patient has a high
risk of heart disease.
✓ Classification algorithms learn to map the
input features to one of the predefined classes.
Here are some classification algorithms:
✓Logistic Regression
✓Support Vector Machine
✓Random Forest
✓Decision Tree
✓K-Nearest Neighbors (KNN)
✓Naive Bayes
Regression
✓ Regression on the other hand, deals with
predicting continuous target variables, which
represent numerical values.
✓ For example, predicting the price of a house
based on its size, location, and amenities, or
forecasting the sales of a product.
✓ Regression algorithms learn to map the input
features to a continuous numerical value.
Here are some regression algorithms:
✓Linear Regression
✓Polynomial Regression
✓Ridge Regression
✓Lasso Regression
✓Decision tree
✓Random Forest
Linear regression
Linear regression is a type of supervised machine
learning algorithm that computes the linear
relationship between the dependent variable and
one or more independent features by fitting a
linear equation to observed data.
Types of Linear Regression
There are two main types of linear regression:
✓ Simple Linear Regression
✓ Multiple Linear Regression
Simple Linear Regression
This is the simplest form of linear regression, and it
involves only one independent variable and one
dependent variable.
where:
Y is the dependent variable
X is the independent variable
β0 is the intercept
β1 is the slope
Multiple Linear Regression
This involves more than one independent variable and
one dependent variable.
where:
Y is the dependent variable
X1, X2, …, Xp are the independ
X1, X2, …, Xp are the independent variables
β0 is the intercept
β1, β2, …, βn are the slopes
least squares method
The least squares method is a form of mathematical
regression analysis used to determine the line of best
fit for a set of data, providing a visual demonstration
of the relationship between the data points.
y = a + bx
OR