NPTEL Python for Data Science Week 4 Assignment Answer

ABOUT THE COURSE :
The course aims at equipping participants to be able to use python programming for solving data science problems.
INTENDED AUDIENCE : Final Year Undergraduates

PRE-REQUISITES
: Knowledge of basic data science algorithms

NPTEL Python for Data Science Week 4 Assignment Answer

Course layout

Week 1:
BASICS OF PYTHON SPYDER (TOOL)

• Introduction Spyder
• Setting working Directory
• Creating and saving a script file
• File execution, clearing console, removing variables from environment, clearing environment
• Commenting script files
• Variable creation
• Arithmetic and logical operators
• Data types and associated operations

Week 2:

Sequence data types and associated operations
•        Strings
•        Lists
•        Arrays
•        Tuples
•        Dictionary
•        Sets
•        RangeNumPy
•        ndArray
Week 3:
Pandas dataframe and dataframe related operations on Toyota Corolla dataset
  1. Reading files
  2. Exploratory data analysis
  3. Data preparation and preprocessing
Data visualization on Toyoto Corolla dataset using matplotlib and seaborn libraries
  1. Scatter plot
  2. Line plot
  3. Bar plot
  4. Histogram
  5. Box plot
  6. Pair plot
Control structures using Toyota Corolla dataset
  1. if-else family
  2. for loop
  3. for loop with if break
  4. while loop
  5. Functions
Week 4: CASE STUDY
Regression
  1. Predicting price of pre-owned cars
Classification
  1. Classifying personal income

NPTEL Python for Data Science Week 4 Assignment Answer

Week 4 : Assignment 4

Due date: 2025-02-19, 23:59 IST.
Assignment not submitted
1 point
Which of the following are regression problems? Assume that appropriate data is given.
 
 
 
 
1 point
Which of the following are multiclass classification problems?
 
 
 
 
1 point
If a linear regression model achieves zero training error, can we say that all the data points lie on a straight line in the feature space?
 
 
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’ 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’

Problem Statement:

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

Read the given datasets ‘ServiceTrain.csv’ and ‘ServiceTest.csv’ as train data and test data respectively and import all the required packages for analysis.

1 point
Which of the following machine learning techniques would NOT be appropriate to solve the problem given in the problem statement?
 
 
 
 
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.
1 point
After applying logistic regression, what is/are the correct observations from the resultant confusion matrix?
 
 
 
 
1 point
The logistic regression model built between the input and output variables is checked for its prediction accuracy of the test data. What is the accuracy range (in %) of the predictions made over test data?
 
 
 
 
1 point
How are categorical variables preprocessed before model building?
 
 
 
 
1 point

A regression model with the function y=80+4.5xy=80+4.5x was built to understand the impact of temperature xx on ice cream sales yy. The temperature this month is 10 degrees more than the previous month. What is the predicted difference in ice cream sales?

 
 
 
 
1 point

XX and YY are two variables that have a strong linear relationship. Which of the following statements are incorrect?

 
 
 
 
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

1 point
A multiple linear regression model is built on the Global Happiness Index dataset ‘GHI Report.csv’. What is the RMSE of the baseline model?
 
 
 
 

Related Posts