Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
29 views

Python For Data Science - Unit 6 - Week 4 - Assignment

Uploaded by

gopalsharmasml
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Python For Data Science - Unit 6 - Week 4 - Assignment

Uploaded by

gopalsharmasml
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

7/31/24, 7:16 PM Python for Data Science - - Unit 6 - Week 4

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

gopalsharmasml@gmail.com 

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

Course Week 4: Assignment 4


outline The due date for submitting this assignment has passed.
Due on 2023-02-22, 23:59 IST.
How does an
NPTEL
online
Assignment submitted on 2023-02-20, 18:32 IST
course 1) Which of the following are regression problems? Assume that appropriate data is 1 point
work? () given.

Week 0 () Predicting the house price.


Predicting whether it will rain or not on a given day.
Week 1 ()
Predicting the maximum temperature on a given day.
Predicting the sales of the ice-creams.
Week 2 ()
No, the answer is incorrect.
Week 3 () Score: 0
Accepted Answers:
Predicting the house price.
Week 4 ()
Predicting the maximum temperature on a given day.
Introduction to Predicting the sales of the ice-creams.
Classification
Case Study 2) Which of the followings are binary classification problems? 1 point
(unit?
unit=56&lesso Predicting whether a patient is diagnosed with cancer or not.
n=57)
Predicting whether a team will win a tournament or not.
Case Study on Predicting the price of a second-hand car.
Classification
Classify web text into one of the following categories: Sports, Entertainment, or
Part I (unit?
Technology.
unit=56&lesso
n=58) Yes, the answer is correct.
Score: 1
Case Study on Accepted Answers:
Classification Predicting whether a patient is diagnosed with cancer or not.
Part II (unit?
Predicting whether a team will win a tournament or not.

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)

Practice: Read the given datasets ‘ ServiceTrain.csv


Week 4: (https://drive.google.com/file/d/19xQAMKRbW4lcKrPf5trrRdDqGTZbg0eU/view?
Practice usp=sharing) ’ and ‘ ServiceTest.csv
Assignment 4 (https://drive.google.com/file/d/1RGrJC55RXuK2Z7TBO6vGuOYSWnclZ2ZI/view?
(assessment?
usp=sharing) ’ as train data and test data respectively and import all the required
name=97)
packages for analysis.
Week 4
4) Which of the following machine learning techniques would NOT be appropriate to 1 point
Feedback
solve the problem given in the problem statement?
Form : Python
for Data
kNN
Science (unit?
unit=56&lesso Random Forest
n=101) Logistic Regression

Download Linear regression

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

Videos () Yes, the answer is correct.


Score: 1
Accepted Answers:
Books ()
Linear regression

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?

True Positive = 29, True Negative = 94


True Positive = 94, True Negative = 29
False Positive = 5, True Negative = 94
None of the above

No, the answer is incorrect.


Score: 0
Accepted Answers:
True Positive = 29, True Negative = 94
False Positive = 5, True Negative = 94

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

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

Yes, the answer is correct.


Score: 1
Accepted Answers:
1.06

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

Yes, the answer is correct.


Score: 1
Accepted Answers:
156 mm

10) 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.
No, the answer is incorrect.
Score: 0
Accepted Answers:
There cannot be a negative relationship between the two variables.
The relationship between the two variables is purely causal.

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

You might also like