The course aims at equipping participants to be able to use python programming for solving data science problems.
PRE-REQUISITES : Knowledge of basic data science algorithms
NPTEL Python for Data Science Week 4 Assignment Answer
Course layout
BASICS OF PYTHON SPYDER (TOOL)
Week 2:
• Lists
• Arrays
• Tuples
• Dictionary
• Sets
• RangeNumPy
• ndArray
Pandas dataframe and dataframe related operations on Toyota Corolla dataset
- Reading files
- Exploratory data analysis
- Data preparation and preprocessing
- Scatter plot
- Line plot
- Bar plot
- Histogram
- Box plot
- Pair plot
- if-else family
- for loop
- for loop with if break
- while loop
- Functions
- Predicting price of pre-owned cars
- Classifying personal income
NPTEL Python for Data Science Week 4 Assignment Answer
Week 4 : Assignment 4
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.
• 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.
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