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 1 Answers||Click Here|
|NPTEL Python for Data Science Assignment 2 Answers||Click Here|
|NPTEL Python for Data Science Assignment 3 Answers||Click Here|
|NPTEL Python for Data Science Assignment 4 Answers||Click Here|
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👇
Read the information given below and answer the questions from 4 to 6:
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?
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?
- 60 – 79
- 90 – 95
- 30 – 59
- 80 – 89
Q.7. How are categorical variables preprocessed before model building?
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 4 Answers Join Group👇
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.
- 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
- • Range
- • ndArray
- Week 3:
- 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
- Line plot
- Bar plot
- Box plot
- Pair plot
- Control structures using Toyota Corolla dataset
- if-else family
- for loop
- for loop with if break
- while loop
- Week 4: CASE STUDY
- Predicting price of pre-owned cars
- 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/