Nptel Notes 2
Nptel Notes 2
Nptel Notes 2
• Location
• Size and area
• Transportation
• Furnished Independent Features Dependent Features
• Utilities
• Pet allowed/not
allowed
Non-linear
• Polynomial Regression
• Neural Network
• Spline Regression
Data Science for Engineers- TA Session 6
Regression Process
Minutes
service (dependent variable)
Minutes
𝝐𝟏 𝝐𝒊 = 𝒚𝒊 − 𝒚𝒊
We have the following data for which we want to calculate the best fit
R studio
Q1) What is the slope (coefficient) of the best-fitting linear regression line for this
dataset?
a) 2.1
b) 1.3
c) 1.7
d) 2.3
Q2) What is the intercept of the best-fitting linear regression line for this dataset?
a) 2.8
b) 1.8
c) 1.9
d) 2.9
What is the predicted value of Y when X = 6 using the linear regression model?
a) 10.1
b) 8.6
c) 11.3
d) 10.7
What is the (R-squared) for the linear regression model fitted to this dataset?
a) 0.55
b) 0.45
c) 0.35
d) 0.60
What is the mean squared error (MSE) for the linear regression model fitted to this
dataset?
a)3.49
b) 2.93
c) 3.98
d) 4.21
Q) If the slope of the linear regression line is 3 and the intercept is 2, what would be
the predicted Y value when X = 8?
a) 24
b) 26
c) 28
d) 30
Sum Square Quantity Definitions
• SST = SSE+SSR
• R² = 1-SSE / SST
If the linear regression model perfectly fits the data, what would be the value of SSE?
A) 0
B) Equal to SST
C) Equal to SSR
D) Indeterminate