Python For Data Science - Unit 6 - Week 4 - Assignment
Python For Data Science - Unit 6 - Week 4 - Assignment
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
gopalsharmasml@gmail.com
https://onlinecourses.nptel.ac.in/noc23_cs21/unit?unit=56&assessment=105 1/5
7/31/24, 7:16 PM Python for Data Science - - Unit 6 - Week 4
unit=56&lesso
n=59)
3) If a linear regression model achieves zero training error, can we say that all the data 1 point
points lie on a hyperplane in the (d+1)-dimensional space? Here, d is the number of features.
Introduction to
Regression Yes
Case Study
No
(unit?
unit=56&lesso Yes, the answer is correct.
n=60) Score: 1
Accepted Answers:
Case Study on Yes
Regression
Part I (unit?
unit=56&lesso Read the information given below and answer the questions from 4 to 6:
n=61)
Data Description:
Case Study on
Regression An automotive service chain is launching its new grand service station this weekend.They offer
Part II (unit? to service a wide variety of cars. The current capacity of the station is to check 315 cars
unit=56&lesso thoroughly per day. As an inaugural offer, they claim to freely check all cars that arrive on their
n=62) launch day, and report whether they need servicing or not!
Case Study on
Unexpectedly, they get 450 cars. The servicemen will not work longer than the working hours,
Regression
Part III (unit? but the data analysts have to!
unit=56&lesso
n=63) Can you save the day for the new service station?
Data sets
How can a data scientist save the day for them?
(unit?
unit=56&lesso
n=64) He has been given a data set, ‘ServiceTrain.csv’ that contains some attributes of the car that can
be easily measured and a conclusion that if a service is needed or not.
Case Study
codes (unit?
Now for the cars they cannot check in detail, they measure those attributes and store them in
unit=56&lesso
‘ ServiceTest.csv
n=65)
(https://drive.google.com/file/d/1RGrJC55RXuK2Z7TBO6vGuOYSWnclZ2ZI/view?usp=sharing) ’
Quiz: Week 4:
Assignment 4 Problem Statement: Use machine learning techniques to identify whether the cars require
(assessment? service or not
name=105)
https://onlinecourses.nptel.ac.in/noc23_cs21/unit?unit=56&assessment=105 2/5
7/31/24, 7:16 PM Python for Data Science - - Unit 6 - Week 4
Text
Prepare the data by following the steps given below, and answer questions 6 and 7.
Transcripts
Encode categorical variable, Service - Yes as 1 and No as 0 for both the train and test
()
datasets.
Split the set of independent features and the dependent feature on both the train and test
datasets.
Set random_state for the instance of the logistic regression class as 0.
5) After applying logistic regression, what is/are the correct observations from the 1 point
resultant confusion matrix?
6) The logistic regression model built between the input and output variables is 1 point
checked for its prediction accuracy of the test data. What is the accuracy range (in %) of the
predictions made over test data?
60 - 79
90 - 95
30 – 59
80 – 89
Standardization
Dummy variables
Correlation
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Dummy variables
https://onlinecourses.nptel.ac.in/noc23_cs21/unit?unit=56&assessment=105 3/5
7/31/24, 7:16 PM Python for Data Science - - Unit 6 - Week 4
The Global Happiness Index report contains the Happiness Score data with multiple
features (namely the Economy, Family, Health, and Freedom) that could affect the target
variable value.
Prepare the data by following the steps given below, and answer question 8
Split the set of independent features and the dependent feature on the given dataset
Create training and testing data from the set of independent features and dependent
feature by splitting the original data in the ratio 3:1 respectively, and set the value for
random_state of the training/test split method’s instance as 1
8) A multiple linear regression model is built on the Global Happiness Index dataset 1 point
“GHI Report.csv
(https://drive.google.com/file/d/1oUCX0DztVDCah_AajtYrn1KzuVGCMndk/view?usp=sharing)”.
What is the RMSE of the baseline model?
2.00
0.50
1.06
0.75
9) A regression model with the following function y = 60 + 5.2x was built to understand 1 point
the impact of humidity (x) on rainfall (y). The humidity this week is 30 more than the previous
week. What is the predicted difference in rainfall?
156 mm
15.6 mm
-156 mm
None of the above
10) X and Y are two variables that have a strong linear relationship. Which of the 1 point
following statements are incorrect?
https://onlinecourses.nptel.ac.in/noc23_cs21/unit?unit=56&assessment=105 4/5
7/31/24, 7:16 PM Python for Data Science - - Unit 6 - Week 4
https://onlinecourses.nptel.ac.in/noc23_cs21/unit?unit=56&assessment=105 5/5