[Week 3] NPTEL Python For Data Science Assignment Answer 2023

NPTEL Python For Data Science Assignment Answer

NPTEL Python For Data Science Assignment Answer 2023

Table of Contents:-

NPTEL Python For Data Science Week 3 Assignment Answer 2023

1. Which of the following is the correct approach to fill missing values in case of categorical variable?

  • None of the above

2. Of the following set of statements, which of them can be used to extract the column Type as a separate dataframe?

  • df_cars[[‘Type’]]
  • df_cars.iloc[[:, 1]
  • df_cars.loc[:, [‘Type’]]

3. The method df_cars.describe() will give description of which of the following column?

  • Price (in lakhs)
  • All of the above

4. Which pandas function is used to stack the dataframes vertically?

  • pd.concat()

5. Which of the following are libraries in Python?

6. Which of the following variable have null values?

  • Review Date

7. Which of the following countries have maximum locations of cocoa manufacturing companies?

8. After checking the data summary, which feature requires a data conversion considering the data values held?

  • Review date
  • Bean origin

9. What is the maximum rating of chocolates?

[Week 3] NPTEL Python For Data Science Assignment Answer 2023

  • [bool, int, float, float, str]
  • [str, int, float, float, str]
  • [bool, int, float, int, str]
  • [bool, int, int, float, str]

NPTEL Python For Data Science Week 2 Assignment Answer 2023

1. Which of the following object does not support ind e xing?

  • dict i onary

2. Given a NumPy array, arr = np.array([[[1, 2, 3], [4, 5, 6], [7, 8, 9]]]), what is the output of the command, print(arr[0][1])?

  • [[1 2 3] [4 5 6] [7 8 9]

3. What is the output of the following code?

[Week 3] NPTEL Python For Data Science Assignment Answer 2023

  • [2, 3, 4, 5]
  • [1, 2, 3, 4]
  • Will throw an error: Set objects are no t iterable.

[Week 3] NPTEL Python For Data Science Assignment Answer 2023

5. Which of the following code gives output My friend’s house is in Chennai?

[Week 3] NPTEL Python For Data Science Assignment Answer 2023

6. Let t1=(1,2, “tuple”,4) and t2=(5,6,7). Which of the follo w ing will not give any error after the execution?

  • t1.append(5)
  • x=t2[t1[1]]
  • t3=(t1 , t2)
  • t3=(list(t1), list(t2))

7. Let d={1:“Pyhton”,2:[1,2,3]}. Which among the fol l owing will not give the error after the execution?

  • d[2].append(4)
  • d.update({‘one’ : 22})

8. Wh i ch of the following data type is immutable?

9. student = {‘name’: ‘Jane’, ‘age’: 25 , ‘courses’: [‘Math’, ‘Statistics’]} Which among the following will return {‘name’: ‘Jane’, ‘age’: 26, ‘courses’: [‘Math’ , ‘Statistics’], ‘phone’: ‘123-456’}?

  • student.update({‘age’ : 26})
  • student.update({‘age’ : 26, ‘phone’: ‘123-456’}) 
  • student[‘phone’] = ‘123-456’

[Week 3] NPTEL Python For Data Science Assignment Answer 2023

[‘M’, ‘A’, ‘H’, ‘E’, ‘S’, ‘H’] [‘m’, ‘a’, ‘h’, ‘e’, ‘s’ , ‘h’] [‘M’, ‘a’, ‘h’, ‘e’, ‘s’, ‘h’] [‘m’, ‘A’, ‘H’, ‘E’, ‘S’, ‘H’]

NPTEL Python For Data Science Week 1 Assignment Answer 2023

[Week 3] NPTEL Python For Data Science Assignment Answer 2023

  • Error: Invalid operation, unsupported operator ‘*’ used between ‘int’ and ‘str’

[Week 3] NPTEL Python For Data Science Assignment Answer 2023

  • Code will throw an error.

4. Which of the following variable names are INVALID in Python?

  • variable_ 1

5. While naming the variable, use of any special character other than unders c ore(_) ill throw which type of error?

  • Syntax error
  • Value er r or
  • Index error

6. Let x = “Mayur”. Which of the following commands converts the ‘x’ to float datatype?

  • str(float,x)
  • x.flo a t()
  • Cannot convert a string to float data type

7. Which Python library is commonly used for data wrangling and manipulation?

[Week 3] NPTEL Python For Data Science Assignment Answer 2023

9. Given two variables, j = 6 and g = 3.3. If both normal division and floor division operators were used to divide j by g, what would be the data type of the value obtained from the operations?

  • float, float

[Week 3] NPTEL Python For Data Science Assignment Answer 2023

Leave a comment Cancel reply

Save my name, email, and website in this browser for the next time I comment.

[Week 1-4] NPTEL Python For Data Science Assignment Answers 2023

NPTEL Python For Data Science Assignment Answer 2023

NPTEL Python For Data Science Assignment Answers

Table of Contents

NPTEL Python For Data Science Week 4 Assignment Answer 2023

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

  • Predicting the house price.
  • Predicting w h ether it will rain or not on a given day.
  • Predicting the maximum temperature on a g iven day.
  • Predicting the sales of the ice-creams.

2. Which of the followings are binary classification problems?

  • Predicting whether a patient is diagnosed with cancer or not.
  • Predicting whether a team will win a tournament or not.
  • Predicting the price of a second-hand car.
  • Classify web text into one of the follow in g categories: Sports, Entertainment, or Technology.

3. If a linear regression model achieves zero training error, can we say that all the data points lie on a hyperplane in the (d+1)-dimensional space? Here, d is the nu m ber of features.

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.

4. Which of the following machine learning techniques would NOT be ap p ropriate to solve the problem given in the problem statement?

  • Random Forest
  • Logisti c Regression
  • Linear regression

5. After applying logistic regression, what is/are the correct observat ion s from the resultant confusion matrix?

  • True Positive = 29, True Negative = 94
  • True Positive = 94, Tr u e Negative = 29
  • False Positive = 5, True Negative = 94
  • None of the above

Prepare the data by following th e steps given below, and answer questions 6 and 7.

  • 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.

6. 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 dat a ?

  • 60 – 79
  • 90 – 9 5

7. How are categorical variables preprocessed before m odel building?

  • Standardization
  • Dummy var i ables
  • Correlation

The Global Happiness Index report contains the Happiness Score data w i th multiple features (namely the Economy, Family, Health, and Freedom) that could affect the target variable value.

Prepare the data by following the steps g iven 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 dat a set ‘GHI_Report.csv’. What is the RMSE of the baseline model?

9. A regression model with the following function y=60+5.2x was built to understand the impact of humidity (x) on rainfall (y). The humidity this week is 30 more than the previous week. Wh a t is the predicted difference in rainfall?

10. X and Y are two variables that have a strong linear relationship. Whi c h of the 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 negativel y correlated with each other

NPTEL Python For Data Science Week 3 Assignment Answer 2023

1. Which of the following is the correct approach to fill missing values in case of categorical variable?

2. Of the following set of statements, which of them can be used to extract the column Type as a separate dataframe?

  • df_cars[[‘Type’]]
  • df_cars.iloc[[:, 1]
  • df_cars.loc[:, [‘Type’]]

3. The method df_cars.describe() will give description of which of the following column?

  • Price (in lakhs)
  • All of the above

4. Which pandas function is used to stack the dataframes vertically?

  • pd.concat()

5. Which of the following are libraries in Python?

6. Which of the following variable have null values?

  • Review Date

7. Which of the following countries have maximum locations of cocoa manufacturing companies?

8. After checking the data summary, which feature requires a data conversion considering the data values held?

  • Review date
  • Bean origin

9. What is the maximum rating of chocolates?

a3q10

  • [bool, int, float, float, str]
  • [str, int, float, float, str]
  • [bool, int, float, int, str]
  • [bool, int, int, float, str]

NPTEL Python For Data Science Week 2 Assignment Answer 2023

1. Which of the following object does not support ind e xing?

  • dict i onary

2. Given a NumPy array, arr = np.array([[[1, 2, 3], [4, 5, 6], [7, 8, 9]]]), what is the output of the command, print(arr[0][1])?

  • [[1 2 3] [4 5 6] [7 8 9]

3. What is the output of the following code?

a2q3

  • [2, 3, 4, 5]
  • [1, 2, 3, 4]
  • Will throw an error: Set objects are no t iterable.

a2q4

5. Which of the following code gives output My friend’s house is in Chennai?

a2q5a

6. Let t1=(1,2, “tuple”,4) and t2=(5,6,7). Which of the follo w ing will not give any error after the execution?

  • t1.append(5)
  • x=t2[t1[1]]
  • t3=(t1 , t2)
  • t3=(list(t1), list(t2))

7. Let d={1:“Pyhton”,2:[1,2,3]}. Which among the fol l owing will not give the error after the execution?

  • d[2].append(4)
  • d.update({‘one’ : 22})

8. Wh i ch of the following data type is immutable?

9. student = {‘name’: ‘Jane’, ‘age’: 25 , ‘courses’: [‘Math’, ‘Statistics’]} Which among the following will return {‘name’: ‘Jane’, ‘age’: 26, ‘courses’: [‘Math’ , ‘Statistics’], ‘phone’: ‘123-456’}?

  • student.update({‘age’ : 26})
  • student.update({‘age’ : 26, ‘phone’: ‘123-456’}) 
  • student[‘phone’] = ‘123-456’

a2q10

[‘M’, ‘A’, ‘H’, ‘E’, ‘S’, ‘H’] [‘m’, ‘a’, ‘h’, ‘e’, ‘s’ , ‘h’] [‘M’, ‘a’, ‘h’, ‘e’, ‘s’, ‘h’] [‘m’, ‘A’, ‘H’, ‘E’, ‘S’, ‘H’]

NPTEL Python For Data Science Week 1 Assignment Answer 2023

A1Q1

  • Error: Invalid operation, unsupported operator ‘*’ used between ‘int’ and ‘str’

A1Q2

  • Code will throw an error.

4. Which of the following variable names are INVALID in Python?

  • variable_ 1

5. While naming the variable, use of any special character other than unders c ore(_) ill throw which type of error?

  • Syntax error
  • Value er r or
  • Index error

6. Let x = “Mayur”. Which of the following commands converts the ‘x’ to float datatype?

  • str(float,x)
  • x.flo a t()
  • Cannot convert a string to float data type

7. Which Python library is commonly used for data wrangling and manipulation?

A1Q8

9. Given two variables, j = 6 and g = 3.3. If both normal division and floor division operators were used to divide j by g, what would be the data type of the value obtained from the operations?

  • float, float

A1Q10n

Share your love

Related posts, [week 1-12] nptel data mining assignment answers 2024.

NPTEL Entrepreneurship Assignment Answers

[Week 1-12] NPTEL Entrepreneurship Assignment Answers 2023

[week 1] nptel water and waste water treatment assignment answers 2024.

NPTEL AI:Constraint Satisfaction Assignment Answer

NPTEL AI:Constraint Satisfaction Assignment Answer (Week 1-2) 2023

[week 1] nptel artificial intelligence: knowledge representation and reasoning assignment answers 2024, [week 1] nptel computer networks and internet protocol assignment answers 2024, leave a comment cancel reply.

Your email address will not be published. Required fields are marked *

Save my name, email, and website in this browser for the next time I comment.

  • Amazon Quiz
  • Flipkart Quiz
  • Play & Win 50,000 Coins
  • Privacy Policy

NPTEL Python for Data Science Assignment 1 Answers 2023

  • by QuizXp Team
  • January 25, 2023 January 25, 2023

NPTEL Python for Data Science Assignment 1 Answers 2023

Are you looking for the Answers to NPTEL Python for Data Science Assignment 1? This article will help you with the answer to the  Nation al Programme on Technology Enhanced Learning  ( NPTEL )  Course “ Python for Data Science Assignment 1 “

Below you can find the answers for Python for Data Science Assignment 1 Answers 2023

NPTEL Python for Data Science Assignment 1 Answers 2023:-

Q1. Which of the following is/are the correct ways of naming variables in Python?

Answer:- Answer will be uploaded soon and will be notified on our telegram channel so please join there click here

Q2. What does 5%11 will evaluate to

Q3. What does 4//7 evaluate to

Q4. What will be the output of the following code snippet?

Next Week Answers: Assignment 02

quizxp telegram

Q5. num_1 = 100 and num_2 = 200

Q6. What is the type of the following expression? 1 + 4 / 2

If there are any changes in answers will notify you on telegram so you can get 100% score, So Join

Q7. What is the type of the following expression?

Q8. What is the output of the following code snippet?

Q9. Which of the arithmetic operators given below cannot be used with ‘strings’ in Python?

Q10. Consider the list of instructions and resulting outputs given below. Pick the set that is incorrect.

Q11. Two variables Xand Y were assigned the following values initially: X = 3 and Y = 6. Which of the following statements will help swap the values between these two variables?

For other courses answers:- Visit

For Internship and job updates:- Visit

Disclaimer: We do not claim 100% surety of answers, these answers are based on our sole knowledge, and by posting these answers we are just trying to help students, so we urge do your assignment on your own.

if you have any suggestions then comment below or contact us at  [email protected]

If you found this article Interesting and helpful, don’t forget to share it with your friends to get this information.

x

  • Tue. Mar 21st, 2023

Brokenprogrammers

Learning platform for programmers

NPTEL Python for Data Science Assignment 4 Answers 2023

nptel python for data science assignment answers 2023

By Brokenprogrammers

NPTEL Python for Data Science Assignment 4 Answers 2023

Hello Learners, In this Post, you will find NPTEL Python for Data Science Assignment 4 week 4 Answers 2023 . All the Answers are provided below to help the students as a reference don’t straight away look for the solutions.

NPTEL Python for Data Science Assignment 4 Answers👇

Note: First try to solve the questions by yourself. If you find any difficulty, then look for the solutions.

NPTEL Python for Data Science Assignment 4 Answers 2023

NPTEL Python for Data Science Assignment 4 Answers 2023:

We are updating answers soon Join Group for update: CLICK HERE

Q.1. Which of the following are regression problems? Assume that appropriate data is 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.

Q.2. Which of the followings are binary classification problems?

  • Predicting whether a patient is diagnosed with cancer or not.
  • Predicting whether a team will win a tournament or not.
  • Predicting the price of a second-hand car.
  • Classify web text into one of the following categories: Sports, Entertainment, or Technology.

Q.3. If a linear regression model achieves zero training error, can we say that all the data points lie on a hyperplane in the (d+1)-dimensional space? Here, d is the number of features.

Nptel python for data science assignment 4 answers join group👇.

NPTEL Python for Data Science Assignment 3 Answers 2023

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.

Q.4. Which of the following machine learning techniques would NOT be appropriate to solve the problem given in the problem statement?

  • Random Forest
  • Logistic Regression
  • Linear regression

Prepare the data by following the steps given below, and answer questions 6 and 7.

  • 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. 

Q.5. After applying logistic regression, what is/are the correct observations from the 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

Q.6. 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?

Q.7. how are categorical variables preprocessed before model building.

  • Standardization
  • Dummy variables
  • Correlation

NPTEL Python for Data Science Week 4 Answers Join Group👇

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

Q.8. A multiple linear regression model is built on the Global Happiness Index dataset “ GHI Report.csv ”. What is the RMSE of the baseline model?

Q.9. a regression model with the following function y = 60 + 5.2x was built to understand 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, q.10. x and y are two variables that have a strong linear relationship. which of the 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.

nptel python for data science assignment answers 2023

Disclaimer : This answer is provided by us only for discussion purpose if any answer will be getting wrong don’t blame us. If any doubt or suggestions regarding any question kindly comment. The solution is provided by  Brokenprogrammers . This tutorial is only for Discussion and Learning purpose.

About NPTEL Python for Data Science Course:

The course aims at equipping participants to be able to use python programming for solving data science problems.

Course Layout:

  • 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
  • Sequence data types and associated operations
  • •        Strings
  • •        Lists
  • •        Arrays
  • •        Tuples
  • •        Dictionary
  • •        Sets
  • •        Range
  • •        ndArray
  • Pandas dataframe and dataframe related operations on Toyota Corolla dataset
  • Reading files
  • Exploratory data analysis
  • Data preparation and preprocessing
  • Data visualization on Toyoto Corolla dataset using matplotlib and seaborn libraries
  • Scatter plot
  • Control structures using Toyota Corolla dataset
  • if-else family
  • for loop with if break
  • Week 4: CASE STUDY
  • Predicting price of pre-owned cars
  • Classification
  • Classifying personal income

CRITERIA TO GET A CERTIFICATE :

Average assignment score = 25% of average of best 8 assignments out of the total 12 assignments given in the course. Exam score = 75% of the proctored certification exam score out of 100

Final score = Average assignment score + Exam score

YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.

If you have not registered for exam kindly register Through https://examform.nptel.ac.in/

Related Post

Nptel introduction to industry 4.0 and industrial internet of things assignment 8 answers 2023, nptel data mining assignment 8 answers 2023, nptel introduction to machine learning assignment 8 answers 2023, leave a reply cancel reply.

Your email address will not be published. Required fields are marked *

Save my name, email, and website in this browser for the next time I comment.

NPTEL Social Networks Assignment 8 Answers 2023

Search code, repositories, users, issues, pull requests...

Provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

nptel-solutions

Here are 55 public repositories matching this topic..., kishanrajput23 / nptel-the-joy-of-computing-using-python.

Study materials related to this course.

  • Updated Oct 27, 2023

kishanrajput23 / NPTEL-Programming-In-java

  • Updated Apr 14, 2022

kadeep47 / NPTEL-Getting-Started-With-Competitive-Programming

[Aug - Oct 2023] Solutions for NPTEL Course Getting started with competitive programming weekly assignment.

  • Updated Sep 6, 2023

omunite215 / NPTEL-Programming-in-Java-Ultimate-Guide

I am sharing my journey of studying a course on Programming in Java taught by Prof.Debasis Samanta Sir IIT Kharagpur

  • Updated Dec 4, 2023

Md-Awaf / NPTEL-Course-Getting-started-with-Competitive-Programming

Solutions for NPTEL Course Getting started with competitive programming weekly assignment.

  • Updated Apr 20, 2023

rvutd / NPTEL-Joy-of-Computing-2020

Programming Assignment Solutions

  • Updated May 5, 2020

guru-shreyansh / NPTEL-Programming-in-Java

The sole intention behind this repository is to help the beginners in Java with the course contents.

  • Updated Aug 1, 2021

gunjanmimo / NPTEL-The-Joy-of-Computing-using-Python

  • Updated Jan 26, 2020

AdishiSood / The-Joy-of-Computing-using-Python

  • Updated Apr 28, 2021

avinashyadav16 / The-Joy-of-Computing-Using-Pyhton

12 Weeks long NPTEL Elective MOOC Course's codes, assignments and solutions.

  • Updated Oct 30, 2023
  • Jupyter Notebook

NPTEL-Course / Programming-Data-Structures-And-Algorithms-Using-Python

Nptel Course Solutions : Programming, Data Structures And Algorithms Using Python

  • Updated Nov 30, 2020

tdishant / NPTEL-Joy-of-Computing-Using-Python

Python code from week-3 to week-12 for the NPTEL course The Joy of Computing using Python

  • Updated Oct 26, 2021

TarunSehgal27 / NPTEL-JAVA-2020

this is a repo about the java program headed by Debasis Samantha during 2020

  • Updated Apr 23, 2020

NPTEL-Course / Google-Cloud-Computing-Foundations

Nptel Course Solution : Google Cloud Computing Foundations

  • Updated Nov 19, 2020

Anmol-PROgrammar / SWAYAM-Programming_In_Java-NPTEL

This site contains the weekly( i.e. 1-9) questions and their solution of NPTEL-SWAYAM course "Programming in Java".

  • Updated Aug 19, 2021

gxuxhxm / NPTEL-The-Joy-of-Computing-using-Python

NPTEL-The-Joy-of-Computing-using-Python with NOTES and Weekly quizes Answers

  • Updated Dec 31, 2023

lonebots / python-programming-joc-nptel

Python programming repository for NPTEL joy of computing course

  • Updated Dec 21, 2020

CGreenP / NPTEL-Introduction-to-Programming-in-C-Assignment-4-Question-1

NPTEL Introduction to Programming in C Assignment 4 Question 1

  • Updated Apr 2, 2024

CGreenP / NPTEL-Introduction-to-Programming-in-C-Assignment-4-Question-3

NPTEL Introduction to Programming in C Assignment 4 Question 3

  • Updated Apr 7, 2024

CGreenP / NPTEL-Programming-Assignment-Road-Trips-and-Museums

NPTEL Programming Assignment: Road Trips and Museums.

  • Updated Mar 3, 2024

Improve this page

Add a description, image, and links to the nptel-solutions topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the nptel-solutions topic, visit your repo's landing page and select "manage topics."

Category: NPTEL

Programming in modern c++ | week 12, introduction to internet of things week 12, introduction to industry 4.0 and industrial internet of things | week 12, an introduction to artificial intelligence | week 12, the joy of computing using python | week 12, quantum mechanics 1 | week 12, programming in java | week 12, principles of management | week 12, leadership and team effectiveness | week 12, introduction to machine learning | week 12.

nptel python for data science assignment answers 2023

NPTEL Python for Data Science Assignment 4 Answers 2023

NPTEL Python for Data Science Assignment 4 Answers 2023:-  All the Answers provided below to help the students as a reference, You must submit your assignment at your own knowledge.

NPTEL Python For Data Science Week 4 Assignment Answer 2023

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

  • Predicting the house price.
  • Predicting w h ether it will rain or not on a given day.
  • Predicting the maximum temperature on a g iven day.
  • Predicting the sales of the ice-creams.

2. Which of the followings are binary classification problems?

  • Predicting whether a patient is diagnosed with cancer or not.
  • Predicting whether a team will win a tournament or not.
  • Predicting the price of a second-hand car.
  • Classify web text into one of the follow in g categories: Sports, Entertainment, or Technology.

3. If a linear regression model achieves zero training error, can we say that all the data points lie on a hyperplane in the (d+1)-dimensional space? Here, d is the nu m ber of features.

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.

4. Which of the following machine learning techniques would NOT be ap p ropriate to solve the problem given in the problem statement?

  • Random Forest
  • Logisti c Regression
  • Linear regression

5. After applying logistic regression, what is/are the correct observat ion s from the resultant confusion matrix?

  • True Positive = 29, True Negative = 94
  • True Positive = 94, Tr u e Negative = 29
  • False Positive = 5, True Negative = 94
  • None of the above

Prepare the data by following th e steps given below, and answer questions 6 and 7.

  • 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.

6. 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 dat a ?

  • 60 – 79
  • 90 – 9 5

7. How are categorical variables preprocessed before m odel building?

  • Standardization
  • Dummy var i ables
  • Correlation

The Global Happiness Index report contains the Happiness Score data w i th multiple features (namely the Economy, Family, Health, and Freedom) that could affect the target variable value.

Prepare the data by following the steps g iven 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 dat a set ‘GHI_Report.csv’. What is the RMSE of the baseline model?

9. A regression model with the following function y=60+5.2x was built to understand the impact of humidity (x) on rainfall (y). The humidity this week is 30 more than the previous week. Wh a t is the predicted difference in rainfall?

10. X and Y are two variables that have a strong linear relationship. Whi c h of the 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 negativel y correlated with each other

About Python For Data Science

The course aims at equipping participants to be able to use python programming for solving data science problems. CRITERIA TO GET A CERTIFICATE Average assignment score = 25% of the average of the best 3 assignments out of the total 4 assignments given in the course. Exam score = 75% of the proctored certification exam score out of 100 Final score = Average assignment score + Exam score YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.

NPTEL Python for Data Science Assignment 4 Answers July 2022

1. The power consumption of an individual house in a residential complex has been recorded for the previous year. This data is analysed to predict the power consumption for the next year . Under which type of machine learning problem does this fall under? a. Classification b. Regression c. Reinforcement Learning d. None of the above

2. A dataset contains data collected by the Tamil Nadu Pollution Control Board on environmental conditions (154 variables) from one of their monitoring stations. This data is further analyzed to understand the most significant factors that affect the Air Quality Index. The predictive algorithm that can be used in this situation is _______ _ ___. a. Logistic Regression b. Simple Linear Regression c. Multiple Linear Regression d . None of the above

Answers will be Uploaded Shortly and it will be Notified on Telegram, So  JOIN NOW

NPTEL Python for Data Science Assignment 4 Answers 2023

3. A regression model with the following function y = 60 + 5.2x was built to understand 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? a. 156 mm b. 15.6 mm c. -156 mm d. None of the above

4. Which of the following machine learning techniques would NOT be appropriate to solve the problem given in the problem statement? a. kNN b. Random Forest c . Logistic Regression d. Linear regression

5. The plot shown below denotes the percentage distribution of the target column values within the train_data dataframe. Which of the following options are correct?

NPTEL Python for Data Science Assignment 4 Answers 2023

6. After applying logistic regression, what is/are the correct observations from the resultant confusion matrix? a. True Positive = 29, True Negative = 94 b. True Positive = 94, True Negative = 29 c. False Positive = 5 , True Negative = 94 d. None of the above

👇 For Week 04 Assignment Answers 👇

7. 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? a. 60 – 79 b. 90 – 95 c. 30 – 59 d. 80 – 89

8. How are categorical variables preprocessed before model building? a. Standardization b. Dummy variables c. Correlation d. None of the above

9. A multiple linear regression model is built on the Global Happiness Index dataset “GHI_Report.csv”. What is the RMSE of the baseline model? a. 2.00 b. 0.50 c. 1.06 d. 0.75

10. X and Y are two variables that have a strong linear relationship. Which of the following statements are incorrect? a. There cannot be a negative relationship between the two variables. b. The relationship between the two variables is purely causal. c. One variable may or may not cause a change in the other variable . d. The variables can be positively or negatively correlated with each other.

For More NPTEL Answers:-  CLICK HERE Join Our Telegram:-  CLICK HERE

NPTEL Python for Data Science Assignment 4 Answers Jan 2022

Q1. How many unique values are present in the Sbal feature; also, what is the most frequent value within Sbal?

(A) 5, Rs. >= 10,000 (B) 4, Rs. < 1000 (C) 5, Rs. < 1000 (D) 4, ‘1000 <= Rs. < 5,000’

Answer:- (C) 5, Rs. < 1000

The answers will be Uploaded Shortly and it will be notified on Telegram. So Join Now

Q2. Find the average age of those customers who have a credit history [Chist] wherein the dues are not paid earlier.

(A) 35.54  (B) 38.44  (C) 33.00  (D) None of the above

Answer:- (B) 38.44 

Q3. A Logistic Regression model is built in which none of the features used are standardized. The train to test proportion is 75:25 and the random state is set to 1. The accuracy of the model is ________.

(A) Less than 50%  (B) Between 50% and 60%  (C) Greater than 70%  (D) None of the above

Answer:- (C) Greater than 70% 

Q4. Import StandardScaler() from the sklearn.preprocessing package to standardize the features. Use the same train-test proportion and the random state should be set to 1. After standardizing the logistic regression model, by what percentage has the misclassified samples changed?

(A) 11.11%  (B) 3.7%  (C) 20%  (D) 39.2%

Answer:- (C) 20% 

Q5. When KNN classification is applied on the same standardized data at the optimal value for k nearest neighbours, the accuracy achieved is ______.

(A) 64%  (B) 78%  (C) 76.4%  (D) None of the above

Answer:- (A) 64% 

Q6. A multiple linear regression model is built on the Global Happiness Index dataset “ GHI_Report.csv ”. What is the rmse of the baseline model?

(A) 1.99  (B) 0.85  (C) 1.06  (D) 0.33

Answer:- (C) 1.06 

Q7. From the multiple linear regression model built on the GHI index, we get an R-squared value of _______ on the test data subset.

(A) 55.63  (B) 45.81  (C) 75.59  (D) 81.46

Answer:- (D) 81.46

Q8. Which of the following statement/s about Linear Regression is / are true?

(A) Linear Regression assumes that there exists a linear relationship between the independent variable and dependent variable.  (B) The error terms are assumed to be independent and normally distributed.  (C) The percentage of variation in the dependent variable as explained by the independent variable/variables is expressed by R-squared value.  (D) Residuals are the product of the predicted value and the actual observed value.

Answer:- (A), (B), (C)

Q9. Which of the following statements is inaccurate about Logistic Regression?

(A) Logistic Regression doesn’t require a linear relationship between the dependent and independent variables.  (B) The value of the logistic function being a probability will range between 0 and 1.  (C) Cost function of Logistic Regression is also called as the Log Loss function.  (D) The dependent variable can be of both numerical or categorical type just like the independent variables.

Answer:- (C) Cost function of Logistic Regression is also called as the Log Loss function. 

Q10. In a KNN model, by which means do we handle categorical variables?

(A) Standardization  (B) Dummy variables  (C) Correlation  (D) None of the above

Answer:- (B) Dummy variables 

Disclaimer :- We do not claim 100% surety of solutions, these solutions are based on our sole expertise, and by using posting these answers we are simply looking to help students as a reference, so we urge do your assignment on your own.

For More NPTEL Answers:-  CLICK HERE

Join Our Telegram:-  CLICK HERE

NPTEL Python for Data Science Assignment 4 Answers 2022:-  All the Answers provided below to help the students as a reference, You must submit your assignment at your own knowledge.

Leave a Comment Cancel reply

You must be logged in to post a comment.

swayam-logo

Python for Data Science

Note: This exam date is subjected to change based on seat availability. You can check final exam date on your hall ticket.

Page Visits

Course layout.

  • Reading files
  • Exploratory data analysis
  • Data preparation and preprocessing
  • Scatter plot
  • if-else family
  • for loop with if break
  • Predicting price of pre-owned cars
  • Classifying personal income

Books and references

Instructor bio.

nptel python for data science assignment answers 2023

Prof. Ragunathan Rengasamy

Course certificate.

nptel python for data science assignment answers 2023

DOWNLOAD APP

nptel python for data science assignment answers 2023

SWAYAM SUPPORT

Please choose the SWAYAM National Coordinator for support. * :

Study2night - All about an engineer

  • AWS Cloud Foundation
  • _Joy Of Computing
  • _Data Science For Engineers
  • Internships

Nptel data Science for Engineers Assignment 4 Answers 2023| Data Science for Engineers | Study2night

NPTEL Data Science for Engineers Assignment 4 Answers 2023?  In this article we will discuss about the answers for Week 4 assignment of Data science for Engineers. All these answers are make it as reference.I am confident in providing these answers.

Also Read:  NPTEL Data Science for Engineers Assignment 3 Answers 2023  

About Nptel

National programme on Technology enhanced learning ( NPTEL ) , is a very best online platform to do internships. In this Platform, it is providing free internship to students and professionals in India. It is initiated taken by Ministry of Human Resource Development (MHRD) in the year 2003. It is collabarated with 7 IIT's and IIT sc . It is providing high quality education and cost effective education to students and the professionals across the country. It is providing free resource of learning, assignments and quizes to solve.   

Nptel data Science for Engineers Assignment 3 Answers 2023

NPTEL Data Science for Engineers Assignment 4 Answers 2023 

Last Date: 22-02-2023

You can find the answers for Data Science for Engineers Assignment 4 Answers 2023 below

Q1.  Let f(x)=x^3+6x^2−3x−5. Select the correct options from the given options below : 

a. −2+√5 will give the maximum for f(x).

b. −2+√5 will give the minimum for f(x). 

c. The stationary points of f(x) are −2+√5 and −2+√5 

d. The stationary points of f(x) are -4 and 0

Answer: [ c , b ]  

                Reason : f '' (x) at   −2+√5 is > 0. Hence, it is called as local minima. 

             To find the stationary points of f(x), we need to find the values of x where f'(x) = 0.

f(x) = x^3 + 6x^2 - 3x - 5

f'(x) = 3x^2 + 12x - 3

Consider f'(x) = 0, we get:    3x^2 + 12x - 3 = 0

Dividing on both sides by 3:  x^2 + 4x - 1 = 0

Using the quadratic formula, we get:

x= -b ± sqrt(4*a*c - 2*a)

x = (-4 ± sqrt(16 + 4))/2 = (-4 ± sqrt(20))/2

x = -2 ± sqrt(5)

So the stationary points of f(x) are -2 + sqrt(5) and -2 - sqrt(5). 

To determine whether each point is a maximum or minimum , we need to look at the sign of f''(x) at each point.

f''(x) = 6x + 12

At x = -2 + sqrt(5), we have,

f''(-2 + sqrt(5)) = 6(-2 + sqrt(5)) + 12 = -6 + 6sqrt(5) > 0

So -2 + sqrt(5) is a local minimum.

At x = -2 - sqrt(5), we have,

f''(-2 - sqrt(5)) = 6(-2 - sqrt(5)) + 12 = -6 - 6sqrt(5) < 0

So -2 - sqrt(5) is a local maximum.

From the following information given below, answer the below questions Q2 and Q3.

Consider the following Optimization problem. 

                                                         maxxϵRf(x) , where                                     f(x)=x^4+7x^3+5x^2−17^x+3

Let x∗ be the maximizer of f(x)

Q2.  What is the second order sufficient condition for x∗ to be the maximize of the function f(x)? 

a. 4x^3 + 21x^2 + 10x - 17 = 0

b. 12x^2 + 42x + 10 = 0

c. 12x^2 + 42x + 10 > 0

d. 12x^2 + 42x + 10 < 0 

Answer:   [ c]   12x^2 + 42x + 10 > 0 

                 

Q3. Find the value of x*

Answer:   [ c ] -1.43  

Q4. Let f(x) = 2Sin x , 0≤x≤2π . Select the correct the options from the given following . 

a. π/2 is the global maximum of f(x).

b. π is the global minimum of f(x). 

c. 3π/2 is the global maximum of f(x). 

d. 3π/2 is the global maximum of f(x). 

Answer:   [ a, d ]  

Using the following information answer the following questions Q5, Q6, Q7,Q8. 

Let f(x) = 2x1^2 + 3x1x2 + 3x2^2 + x1 + 3x2

Q5. Find the gradient of f(x). 

Find the gradient of f(x).

Conclusion:

One Comment Please !

Contact Form

IMAGES

  1. NPTEL PYTHON FOR DATA SCIENCE ASSIGNMENT 3 ANSWERS

    nptel python for data science assignment answers 2023

  2. NPTEL 2023: Python For Data Science Week 2 Answers

    nptel python for data science assignment answers 2023

  3. {Week 4} NPTEL Python For Data Science Assignment Answer 2023

    nptel python for data science assignment answers 2023

  4. NPTEL Python For Data Science Assignment 1 Answers 2023

    nptel python for data science assignment answers 2023

  5. NPTEL Python for Data Science Week 2 Quiz Assignment Solutions

    nptel python for data science assignment answers 2023

  6. NPTEL Python For Data Science Assignment 4 Answers 2023

    nptel python for data science assignment answers 2023

VIDEO

  1. NPTEL PYTHON FOR DATA SCIENCE WEEK 1 ASSIGNMENT SOLUTIONS 2024. #nptel #python #datascience #week1

  2. NPTEL || Python for Data Science || Assignment-3 Solution || Jan -April 2023

  3. NPTEL PYTHON FOR DATA SCIENCE WEEK 4 ASSIGNMENT SOLUTION #python #datascience #week14

  4. Python For Data Science Assignment Solution

  5. Python For Data Science

  6. Python For Data Science

COMMENTS

  1. Python for Data Science

    Python for Data Science. By Prof. Ragunathan Rengasamy | IIT Madras. Learners enrolled: 49366. 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.

  2. [Week 3] NPTEL Python For Data Science Assignment Answer 2023

    NPTEL Python For Data Science Week 3 Assignment Answer 2023. 1. Which of the following is the correct approach to fill missing values in case of categorical variable? Mean. Median. Mode.

  3. [Week 1-4] NPTEL Python For Data Science Assignment Answers 2023

    Answer :- a, c. Prepare the data by following th e steps given below, and answer questions 6 and 7. 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.

  4. NPTEL PYTHON FOR DATA SCIENCE ASSIGNMENT 3 ANSWERS

    The course aims at equipping participants to be able to use python programming for solving data science problems. Join Channel Membership t...

  5. Python for Data Science Week 4 Assignment 4 Solution

    #pythonfordatascience #nptel #swayam #python #datascience Python for Data Science All week Assignment Solution - https://www.youtube.com/playlist?list=PL__28...

  6. Python For Data Science

    In this NPTEL Week 1 Assignment for Python For Data Science, we delve into the fascinating world of data science and its implementation using Python programm...

  7. NPTEL Python for Data Science Assignment 3 Answers 2023

    NPTEL Python for Data Science Assignment 3 Answers 2023:-. Q1. Which of the following is the correct approach to fill missing values in case of categorical variable? Answer:- c. Mode. Q2. Assume a pandas dataframe df_cars which when printed is as shown below. Based on this information, answer questions 2 and 3.

  8. Python for Data Science

    Solutions and exemplary problems coded while attending a 4 weeks course in data science using Python offered by Indian Institute of Technology Madras, India. Python for Data Science. By Prof. Ragunathan Rengasamy | IIT Madras. Course Begin: July 25, 2022. Course Exam (Programming Test): September 16, 2022 (Duration of the session will be 3 hrs ...

  9. nptel-assignments · GitHub Topics · GitHub

    To associate your repository with the nptel-assignments topic, visit your repo's landing page and select "manage topics." GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.

  10. NPTEL Python for Data Science Assignment 1 Answers 2023

    This article will help you with the answer to the National Programme on Technology Enhanced Learning Course " Python for Data Science Assignment 1 " Below you can find the answers for Python for Data Science Assignment 1 Answers 2023. NPTEL Python for Data Science Assignment 1 Answers 2023:-Q1.

  11. Python For Data Science Week 3: Assignment 3 Answers || July

    Python For Data Science Week 3: Assignment 3 Answers || July - Dec 2023 || NPTEL1.Software Testing Week 2 : Assignment 2 Solutions || July - 2023 || NPTEL ...

  12. (Week 1) NPTEL Python for Data Science Assignment 1 Answers 2023

    About Python For Data Science. The course aims at equipping participants to be able to use python programming for solving data science problems. CRITERIA TO GET A CERTIFICATE. Average assignment score = 25% of average of best 3 assignments out of the total 4 assignments given in the course. Exam score = 75% of the proctored certification exam ...

  13. Python for Data Science

    The exam date for this course: Sep 24, 2023. 2. CLICK HERE to register for the exam. Please fill the exam form using the same Enrolled email id & make fee payment via the form, as before. 3. Choose from the Cities where exam will be conducted: Exam Cities. 4. You DO NOT have to re-enroll in the courses.

  14. NPTEL Python for Data Science Assignment 4 Answers 2023

    By Brokenprogrammers. Hello Learners, In this Post, you will find NPTEL Python for Data Science Assignment 4 week 4 Answers 2023. All the Answers are provided below to help the students as a reference don't straight away look for the solutions. NPTEL Python for Data Science Assignment 4 Answers👇. Note: First try to solve the questions by ...

  15. nptel-solutions · GitHub Topics · GitHub

    Add this topic to your repo. To associate your repository with the nptel-solutions topic, visit your repo's landing page and select "manage topics." GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.

  16. NPTEL Python for Data Science Week 4 Quiz Assignment Solutions

    🔊NPTEL Python for Data Science 2023 | https://techiestalk.in/⛳ABOUT THE COURSE :The course aims at equipping participants to be able to use python programmi...

  17. NPTEL Assignment Answers And Solutions Jan-Apr 2024 Progiez

    NPTEL Assignment Answers and solutions of all courses. Week 1,2,3, 4, 5, 6, 7 , 8, 9, 10 ,11, 12 Answers. By Swayam platform. Jan Apr 2024 by progiez

  18. NPTEL Python For Data Science Assignment 4 Answers 2023

    Answer :- For Answer Click Here. Prepare the data by following th e steps given below, and answer questions 6 and 7. 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.

  19. Python for Data Science

    The course is free to enroll and learn from. But if you want a certificate, you have to register and write the proctored exam conducted by us in person at any of the designated exam centres. The exam is optional for a fee of Rs 1000/- (Rupees one thousand only).Date and Time of Exams:27 March 2022Morning session 9am to 12 noon; Afternoon ...

  20. NPTEL PYTHON FOR DATA SCIENCE ASSIGNMENT 4 ANSWERS

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

  21. Nptel data Science for Engineers Assignment 4 Answers 2023| Data

    NPTEL Data Science for Engineers Assignment 4 Answers 2023 Last Date: 22-02-2023. You can find the answers for Data Science for Engineers Assignment 4 Answers 2023 below. Q1. Let f(x)=x^3+6x^2−3x−5. Select the correct options from the given options below : a. −2+√5 will give the maximum for f(x). b. −2+√5 will give the minimum for f(x).

  22. Python for Data Science|| WEEK-2 Quiz assignment Answers 2023||NPTEL||

    Python for Data Science|| WEEK-2 Quiz assignment Answers 2023||NPTEL||#SKumarEduThese are solutions regarding submission of NPTEL " PYTHON FOR DATA SCIENCE "...