0% found this document useful (0 votes)
4 views4 pages

W4 Assgn2

The document outlines an assignment related to machine learning and data analysis, focusing on regression and classification problems, as well as practical applications in a real-world scenario involving an automotive service chain. It includes questions about identifying regression and classification problems, applying logistic regression, and preprocessing categorical variables. Additionally, it discusses the Global Happiness Index dataset and the evaluation of a multiple linear regression model.

Uploaded by

poornimak2403
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)
4 views4 pages

W4 Assgn2

The document outlines an assignment related to machine learning and data analysis, focusing on regression and classification problems, as well as practical applications in a real-world scenario involving an automotive service chain. It includes questions about identifying regression and classification problems, applying logistic regression, and preprocessing categorical variables. Additionally, it discusses the Global Happiness Index dataset and the evaluation of a multiple linear regression model.

Uploaded by

poornimak2403
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/ 4

X

Week 4 : Assignment 4
The due date for submitting this assignment has passed.
Due on 2024-08-21, 23:59 IST.

Assignment submitted on 2024-08-21, 23:21 IST


1) Which of the following are regression problems? Assume that appropriate data is 1 point
given.

Predicting the house price.


Predicting whether it will rain or not on a given day.
Predicting the maximum temperature on a given day.
Predicting the sales of the ice-creams.

Yes, the answer is correct.


Score: 1
Accepted Answers:
Predicting the house price.
Predicting the maximum temperature on a given day.
Predicting the sales of the ice-creams.

2) Which of the following are multiclass classification problems? 1 point

Classifying emails as spam or not spam.


Classifying a person’s blood type as A, B, AB, or O.
Predicting the price of a second-hand car.
Classifying a movie genre into Drama, Comedy, Action, or Thriller.

Yes, the answer is correct.


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

3) If a linear regression model achieves zero training error, can we say that all the data 1 point
points lie on a straight line in the feature space?

Yes
No

Yes, the answer is correct.


Score: 1
Accepted Answers:
Yes
Read the information given below and answer the questions from 4 to 6:

Data Description:

An automotive service chain is launching its new grand service station this weekend.
They offer 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 launch day, and report whether they need servicing or not!

Unexpectedly, they get 450 cars. The servicemen will not work longer than the working hours,
but the data analysts have to!

Can you save the day for the new service station?

How can a data scientist save the day for them?

He has been given a data set, ‘ServiceTrain.csv


(https://drive.google.com/file/d/1n1Hv9TtHTBUhU84z-S4wBBgoOOoKKrm7/view?
usp=drive_link)’ that contains some attributes of the car that can be easily measured and a
conclusion that if a service is needed or not.

Now for the cars they cannot check in detail, they measure those attributes and store them in
‘ServiceTest.csv
(https://drive.google.com/file/d/1h_Va9tkMB6UDSuqD6MzeYqgdph6yhtmy/view?
usp=drive_link)’

Problem Statement:

Use machine learning techniques to identify whether the cars require service or not.

Read the given datasets ‘ServiceTrain.csv


(https://drive.google.com/file/d/1n1Hv9TtHTBUhU84z-S4wBBgoOOoKKrm7/view?
usp=drive_link)’ and ‘ServiceTest.csv
(https://drive.google.com/file/d/1h_Va9tkMB6UDSuqD6MzeYqgdph6yhtmy/view?
usp=drive_link)’ as train data and test data respectively and import all the required
packages for analysis.

4) Which of the following machine learning techniques would NOT be appropriate to 1 point
solve the problem given in the problem statement?

kNN
Random Forest
Logistic Regression
Linear regression

Yes, the answer is correct.


Score: 1
Accepted Answers:
Linear regression

Prepare the data by following the steps given below, and answer questions 5 and 6.
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

Yes, the answer is correct.


Score: 1
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

8) A regression model with the function 𝑦 = 80 + 4.5𝑥 was built to understand the 1 point
impact of temperature 𝑥 on ice cream sales 𝑦 . 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
80 units
None of the above

Yes, the answer is correct.


Score: 1
Accepted Answers:
45 units

9) 𝑋 and 𝑌 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/1c7UeZMZuYYfOXMMagI4UpvC-
VrJ7MXc8/view?usp=drive_link)’. 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

You might also like