0% found this document useful (0 votes)
9 views9 pages

Cs3491 - Aiml - Unit III - Single and Multiple Variables

Uploaded by

Soban
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)
9 views9 pages

Cs3491 - Aiml - Unit III - Single and Multiple Variables

Uploaded by

Soban
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/ 9

Department of Computer Science &

Engineering

Regulation 21

Semester: III

Course Code: CS3491

Course Name: Artificial Intelligence and Machine Learning

K.Sumithra Devi
Assistant Professor
CSE
1
KCG DEPARTMENT OF CSE 1
UNIT III SUPERVISED LEARNING – SINGLE AND MULTIPLE VARIABLES

CO 3 Build supervised learning models

K3

KCG DEPARTMENT OF CSE 2


Single and Multiple Variables
Linear regression is a statistical method used to model the relationship between a
dependent variable and one independent variable.
It aims to establish a linear relationship between these variables and can be used
for both prediction and understanding the nature of the relationship.

KCG DEPARTMENT OF CSE 3


Y = C0 + C1X + e
where,
Y: Dependent Variable (target variable)
X: Independent Variable (input variable)
C0: Intercept (value of Y when X=0)
C1: Slope of line
e: Error term
Assumptions of Linear Regression
Here are some assumption that must be satisfied for the linear regression model to be valid.
Linearity: The relationship between the independent and dependent variables should be linear.
Independence: Observations should be independent of each other.
Homoscedasticity: The variance of the errors should be the same across all levels of the
independent variables.
Normality: The dependent variable is normally distributed for a fixed value of the independent
variable.
No Multicollinearity: This is more pertinent for multiple regression, where all independent
variables should be independent.

KCG DEPARTMENT OF CSE 4


Limitations of Linear Regression

• Outliers: This can significantly impact the slope and intercept of the
regression line.
• Non-linearity: Linear regression assumes a linear relationship, but
this assumption may not hold in some cases.
• Correlation ≠ Causation: Just because two variables have a linear
relationship doesn’t mean changes in one cause changes in the other.

5
KCG DEPARTMENT OF CSE 5
What is Multiple Regression?
Multiple regression is an extension of simple linear regression. It’s used to model
the relationship between one dependent variable and two or more independent
variables. The primary purpose is to understand how the dependent variable
changes as the independent variables change.
Mathematical Equation
The mathematical representation of multiple regression is:
Y = C0 + C1X1 + C2X2 + C3X3 + ….. + CnXn + e
where,
Y: Dependent Variable (target variable)
X1, X2, X3,…, Xn: Independent Variable (input variable)
C0: Intercept (value of Y when X=0)
C1, C2, C3, C4, C5, …., Cn: Slope of line
e: Error term

KCG DEPARTMENT OF CSE 6


Example of Linear and Multiple Regression
Problem Statement: Suppose we have data for a retail company. The company
wants to understand how their advertising expenses in various channels (e.g., TV,
Radio) impact sales.

Linear Regression: Predict sales using only TV advertising expenses.


Multiple Regression: Predict sales using both TV and Radio advertising expenses.
Output
Linear Regression RMSE: 27.18
Multiple Regression RMSE: 25.27
This implies multiple regression gives a better fit to the data

7
KCG DEPARTMENT OF CSE 7
8
KCG DEPARTMENT OF CSE 8
9
KCG DEPARTMENT OF CSE 9

You might also like