9/18/25, 2:56 PM Python for Data Science - - Unit 7 - Week 4
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
[email protected]
NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Python for Data Science (course)
If already
registered, click
to check your
Week 4 : Assignment 4
payment status The due date for submitting this assignment has passed.
Due on 2025-08-20, 23:59 IST.
Course Assignment submitted on 2025-08-19, 08:53 IST
outline
1) Which of the following are regression problems? Assume that appropriate data is 1 point
given.
About
NPTEL () Predicting the house price.
Predicting whether it will rain or not on a given day.
How does an
Predicting the maximum temperature on a given day.
NPTEL
online Predicting the sales of the ice-creams.
course Yes, the answer is correct.
work? () Score: 1
Accepted Answers:
Week 0 () Predicting the house price.
Predicting the maximum temperature on a given day.
Week 1 () Predicting the sales of the ice-creams.
Week 2 () 2) Which of the following are multiclass classification problems? 1 point
Classifying emails as spam or not spam.
Week 3 ()
Classifying a person’s blood type as A, B, AB, or O.
Week 4 () Predicting the price of a second-hand car.
Classifying a movie genre into Drama, Comedy, Action, or Thriller.
Introduction to
Classification Yes, the answer is correct.
Case Study Score: 1
(unit? Accepted Answers:
unit=56&lesso Classifying a person’s blood type as A, B, AB, or O.
n=57) Classifying a movie genre into Drama, Comedy, Action, or Thriller.
https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=56&assessment=171 1/5
9/18/25, 2:56 PM Python for Data Science - - Unit 7 - Week 4
Case Study on 3) If a linear regression model achieves zero training error, can we say that all the data 1 point
Classification points lie on a straight line in the feature space?
Part I (unit?
unit=56&lesso Yes
n=58) No
Case Study on Yes, the answer is correct.
Classification Score: 1
Part II (unit? Accepted Answers:
unit=56&lesso Yes
n=59)
Introduction to Read the information given below and answer the questions from 4 to 6:
Regression
Case Study
Data Description:
(unit?
unit=56&lesso
An automotive service chain is launching its new grand service station this weekend. They offer
n=60)
to service a wide variety of cars. The current capacity of the station is to check 315 cars
Case Study on thoroughly per day. As an inaugural offer, they claim to freely check all cars that arrive on their
Regression launch day, and report whether they need servicing or not! Unexpectedly, they get 450 cars. The
Part I (unit?
servicemen will not work longer than the working hours, but the data analysts have to! Can you
unit=56&lesso
save the day for the new service station? How can a data scientist save the day for them? He
n=61)
has been given a data set, ‘ServiceTrain.csv
Case Study on (https://drive.google.com/file/d/1HKxUFm44VaH8_DqQLqX4VPiXZkpfNoVR/view?usp=sharing)’
Regression that contains some attributes of the car that can be easily measured and a conclusion that if a
Part II (unit? service is needed or not. Now for the cars they cannot check in detail, they measure those
unit=56&lesso
attributes and store them in ‘ServiceTest.csv
n=62)
(https://drive.google.com/file/d/1jaWkQusFvX6ZkO8PGIyelMaZRCw3D5v3/view?usp=sharing)’
Case Study on
Regression Problem Statement:
Part III (unit?
unit=56&lesso Use machine learning techniques to identify whether the cars require service or not.
n=63)
Data sets Read the given datasets ‘ServiceTrain.csv
(unit? (https://drive.google.com/file/d/1HKxUFm44VaH8_DqQLqX4VPiXZkpfNoVR/view?
unit=56&lesso usp=sharing)’ and ‘ServiceTest.csv
n=64) (https://drive.google.com/file/d/1jaWkQusFvX6ZkO8PGIyelMaZRCw3D5v3/view?
Case Study usp=sharing)’ as train data and test data respectively and import all the required
codes (unit? packages for analysis.
unit=56&lesso
4) Which of the following machine learning techniques would NOT be appropriate to 1 point
n=65)
solve the problem given in the problem statement?
Week 4
Feedback kNN
Form : Python Random Forest
for Data
Logistic Regression
Science!!
(unit? Linear regression
unit=56&lesso
Yes, the answer is correct.
n=116) Score: 1
Quiz: Week 4 Accepted Answers:
: Assignment Linear regression
4
https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=56&assessment=171 2/5
9/18/25, 2:56 PM Python for Data Science - - Unit 7 - Week 4
(assessment? Prepare the data by following the steps given below, and answer questions 5 and 6.
name=171) • Encode categorical variable, Service - Yes as 1 and No as 0 for both the train and test
Practice:
datasets.
Week 4: • Split the set of independent features and the dependent feature on both the train and test
Practice datasets.
Assignment 4 • Set random_state for the instance of the logistic regression class as 0.
(assessment?
name=172)
5) After applying logistic regression, what is/are the correct observations from the 1 point
resultant confusion matrix?
Supporting
material for True Positive = 29, True Negative = 94
Week 4 () True Positive = 94, True Negative = 29
False Positive = 5, True Negative = 94
Download
None of the above
Videos ()
Yes, the answer is correct.
Score: 1
Problem
Accepted Answers:
Solving
True Positive = 29, True Negative = 94
Session -
False Positive = 5, True Negative = 94
July 2025 ()
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
Yes, the answer is correct.
Score: 1
Accepted Answers:
90 - 95
7) How are categorical variables preprocessed before model building? 1 point
Standardization
Dummy variables
Correlation
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Dummy variables
8) A regression model with the function y = 80 + 4.5x was built to understand the 1 point
impact of temperature x on ice cream sales y. The temperature this month is 10 degrees more
than the previous month. What is the predicted difference in ice cream sales?
56 units
45 units
https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=56&assessment=171 3/5
9/18/25, 2:56 PM Python for Data Science - - Unit 7 - Week 4
80 units
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
45 units
9) X and Y are two variables that have a strong linear relationship. Which of the 1 point
following statements are incorrect?
There cannot be a negative relationship between the two variables.
The relationship between the two variables is purely causal.
One variable may or may not cause a change in the other variable.
The variables can be positively or negatively correlated with each other.
Yes, the answer is correct.
Score: 1
Accepted Answers:
There cannot be a negative relationship between the two variables.
The relationship between the two variables is purely causal.
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 10.
• 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
10) A multiple linear regression model is built on the Global Happiness Index dataset 1 point
‘GHI Report.csv
(https://drive.google.com/file/d/1YYJ2Y1sDWKyFJbhcTCItQpQsgxoEHPl8/view?usp=sharing)’.
What is the RMSE of the baseline model?
2.00
0.50
1.06
0.75
Yes, the answer is correct.
Score: 1
Accepted Answers:
1.06
https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=56&assessment=171 4/5
9/18/25, 2:56 PM Python for Data Science - - Unit 7 - Week 4
https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=56&assessment=171 5/5