0% found this document useful (0 votes)
4 views18 pages

Ai Slides Regression

Uploaded by

owais riaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views18 pages

Ai Slides Regression

Uploaded by

owais riaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Linear

Regression
Agenda
• Introduction of ML (Machine Learning)
• What is Linear Regression?
• Its importance through use-cases. (Applications)
• How it works? (Mathematical Working)
• Evaluation Metrics
• LR implementation with python
• Lecture Take-Away

4/11/2023 2

Introduction of ML
Machine learning is a field of artificial
intelligence that allows systems to


learn and improve from experience
without being explicitly programmed.

3
Types of ML
Machine
Learning

Semi- Reinforcement
Supervised Unsupervised
Supervised Learning

4
Types of ML
Machine
Learning

Semi- Reinforcement
Supervised Unsupervised
Supervised Learning

MOCK LECTURE @ UOL 5


Linear
Regression
What is Linear Regression?
Linear Regression

Linear Regression is a statistical method used in data science and machine


learning to model the relationship between a dependent variable (often called
the target or response variable) and one or more independent variables
(predictors or features).

How to find relationship?

7
Applications
Uses of Linear Regression.
Applications
• Stock Price Prediction
• Sales Forecasting
• Real Estate Price Prediction
• Player Performance Prediction
• Energy Consumption Prediction

9
Mathematics
How linear regression works?
Mathematics Calculations:
Intercept
- Equation of Line:
Ads (X) Sales (Y)
Y = mx + c or = ) + bo
1 14 Slope:
“Unit of change in Y due to X”
3 24
- Formula for regression coefficient:
2 18
b1 =
1 17

3 27 - Formula for Intercept:

bo = )

11
Mathematics Calculations:
Ads (X) Sales (Y) (X – ) () (X – )() (X – )2
1 14 -1 -6 6 1
3 24 1 4 4 1
2 18 0 -2 0 0
1 17 -1 -3 3 1
3 27 -1 7 7 1
=2 = 20 = 20 =4

12
Regression Line (Chart)

13
Evaluation
Metrics
To evaluate model
performance.
Evaluation Metrics
Mean squared error Coefficient of determination
(MSE). (R2):

- N is number of values - SSR: Sum of square due to


regression
- Yi is actual values
- SST: Total sum of squares
- is predicted value of Y
- is mean of Y
- is predicted value of Y

15
Linear Regression code

9/8/20XX PRESENTATION TITLE 16


Lecture Take-Away:
Linear Regression is an ______ algorithm:
A. Unsupervised B. Supervised C. Semi-Supervised
D. None

What is the primary purpose of Linear Regression in data science?


A. To visualize data patterns B. To classify data into categories
C. To model relationships between variables D. To perform clustering
analysis

Linear Regression can be used for:


A. Numeric Data B. Categorical Data C. Both D. None

In which domain is Linear Regression commonly used?


B. Healthcare B. Education C. Finance D. Environmental
Science

What is M in Regression Equation, Y = mx + c? 17


A. Intercept B. Slope C. Error D. Constant
References
1. Lecture from Lecture 9: Linear Regression, UW Genome
Sciences
2. Lecture from John S. Loucks
3. Lecture from Georgia Institute
https://www2.isye.gatech.edu/~yxie77/isye2028/lecture11.
pdf
4. MIT OpenCourseWare, Lecture 6: Regression Analysis

4-11-2023 AI 18

You might also like