[go: up one dir, main page]

0% found this document useful (0 votes)
11 views5 pages

Python For Data Science - Unit 7 - Week 4

This document outlines the Week 4 assignment for the 'Python for Data Science' course, detailing various regression and classification problems along with case studies. It includes specific tasks related to data analysis using machine learning techniques, such as logistic regression and multiple linear regression, with links to datasets for practical application. Additionally, it provides questions and accepted answers related to the course material, emphasizing the importance of data preprocessing and model evaluation.

Uploaded by

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

Python For Data Science - Unit 7 - Week 4

This document outlines the Week 4 assignment for the 'Python for Data Science' course, detailing various regression and classification problems along with case studies. It includes specific tasks related to data analysis using machine learning techniques, such as logistic regression and multiple linear regression, with links to datasets for practical application. Additionally, it provides questions and accepted answers related to the course material, emphasizing the importance of data preprocessing and model evaluation.

Uploaded by

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

8/23/25, 3:50 PM Python for Data Science - - Unit 7 - Week 4

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

dsmari2003@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Python for Data Science (course)


Click to register
for Certification
exam
Week 4 : Assignment 4
(https://examform.nptel.ac.in/2025_10/exam_form/dashboard)
The due date for submitting this assignment has passed.

If already
Due on 2025-08-20, 23:59 IST.
registered, click
to check your Assignment submitted on 2025-08-20, 22:40 IST
payment status
1) Which of the following are regression problems? Assume that appropriate data is 1 point
given.

Predicting the house price.


Course
outline Predicting whether it will rain or not on a given day.
Predicting the maximum temperature on a given day.
About Predicting the sales of the ice-creams.
NPTEL () Yes, the answer is correct.
Score: 1
How does an Accepted Answers:
NPTEL Predicting the house price.
online Predicting the maximum temperature on a given day.
course Predicting the sales of the ice-creams.
work? ()
2) Which of the following are multiclass classification problems? 1 point
Week 0 ()
Classifying emails as spam or not spam.
Week 1 () Classifying a person’s blood type as A, B, AB, or O.
Predicting the price of a second-hand car.
Week 2 ()
Classifying a movie genre into Drama, Comedy, Action, or Thriller.

Week 3 () Yes, the answer is correct.


Score: 1
Accepted Answers:
Week 4 ()
Classifying a person’s blood type as A, B, AB, or O.
Classifying a movie genre into Drama, Comedy, Action, or Thriller.

https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=56&assessment=171 1/5
8/23/25, 3:50 PM Python for Data Science - - Unit 7 - Week 4

Introduction 3) If a linear regression model achieves zero training error, can we say that all the data 1 point
to points lie on a straight line in the feature space?
Classification
Case Study Yes
(unit? No
unit=56&lesso
n=57)
Yes, the answer is correct.
Score: 1
Case Study on Accepted Answers:
Classification Yes
Part I (unit?
unit=56&lesso
n=58) Read the information given below and answer the questions from 4 to 6:

Case Study on Data Description:


Classification
Part II (unit?
An automotive service chain is launching its new grand service station this weekend. They offer
unit=56&lesso
n=59)
to service a wide variety of cars. The current capacity of the station is to check 315 cars
thoroughly per day. As an inaugural offer, they claim to freely check all cars that arrive on their
Introduction launch day, and report whether they need servicing or not! Unexpectedly, they get 450 cars. The
to Regression servicemen will not work longer than the working hours, but the data analysts have to! Can you
Case Study
save the day for the new service station? How can a data scientist save the day for them? He
(unit?
has been given a data set, ‘ServiceTrain.csv
unit=56&lesso
n=60)
(https://drive.google.com/file/d/1HKxUFm44VaH8_DqQLqX4VPiXZkpfNoVR/view?usp=sharing)’
that contains some attributes of the car that can be easily measured and a conclusion that if a
Case Study on service is needed or not. Now for the cars they cannot check in detail, they measure those
Regression
attributes and store them in ‘ServiceTest.csv
Part I (unit?
(https://drive.google.com/file/d/1jaWkQusFvX6ZkO8PGIyelMaZRCw3D5v3/view?usp=sharing)’
unit=56&lesso
n=61)
Problem Statement:
Case Study on
Regression Use machine learning techniques to identify whether the cars require service or not.
Part II (unit?
unit=56&lesso
Read the given datasets ‘ServiceTrain.csv
n=62)
(https://drive.google.com/file/d/1HKxUFm44VaH8_DqQLqX4VPiXZkpfNoVR/view?
Case Study on usp=sharing)’ and ‘ServiceTest.csv
Regression (https://drive.google.com/file/d/1jaWkQusFvX6ZkO8PGIyelMaZRCw3D5v3/view?
Part III (unit? usp=sharing)’ as train data and test data respectively and import all the required
unit=56&lesso
packages for analysis.
n=63)
4) Which of the following machine learning techniques would NOT be appropriate to 1 point
Data sets
solve the problem given in the problem statement?
(unit?
unit=56&lesso
kNN
n=64)
Random Forest
Case Study
Logistic Regression
codes (unit?
unit=56&lesso Linear regression
n=65)
Yes, the answer is correct.
Score: 1
Week 4
Feedback Accepted Answers:
Form : Python
Linear regression
for Data
Science!!

https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=56&assessment=171 2/5
8/23/25, 3:50 PM Python for Data Science - - Unit 7 - Week 4

(unit? Prepare the data by following the steps given below, and answer questions 5 and 6.
unit=56&lesso • Encode categorical variable, Service - Yes as 1 and No as 0 for both the train and test
n=116) datasets.
Quiz: Week 4 • Split the set of independent features and the dependent feature on both the train and test
: Assignment datasets.
4 • Set random_state for the instance of the logistic regression class as 0.
(assessment?
5) After applying logistic regression, what is/are the correct observations from the 1 point
name=171)
resultant confusion matrix?
Practice:
Week 4: True Positive = 29, True Negative = 94
Practice
True Positive = 94, True Negative = 29
Assignment 4
(assessment? False Positive = 5, True Negative = 94
name=172) None of the above

Supporting Yes, the answer is correct.


Score: 1
material for
Accepted Answers:
Week 4 ()
True Positive = 29, True Negative = 94
False Positive = 5, True Negative = 94
Download
Videos ()
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
Problem
predictions made over test data?
Solving
Session -
60 - 79
July 2025 ()
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
8/23/25, 3:50 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
8/23/25, 3:50 PM Python for Data Science - - Unit 7 - Week 4

https://onlinecourses.nptel.ac.in/noc25_cs104/unit?unit=56&assessment=171 5/5

You might also like