Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Machine Learning for Real World Application - Part B - Sample Assessment

Part-B Assessment
Full Marks: 50 Time: 2 hours
Scenario
A bakery plans to offer discounts on its cakes during the upcoming holiday season. The bakery
wants to find the price at which its cakes can be a better deal as compared to its competitors. For
this purpose, the bakery has provided a dataset of past changes in sales based on price change.
We need to train a model that can predict the demand for the cake during the holiday season with
different price segments.
NOTE: Please refer the dataset uploaded in the course node with “product_demand.csv”

Question 1 10 marks
a) Create a dataframe from the dataset provided and display the first 5 rows along with
column names.
3 marks
b) Check if any there are any missing values in the dataset. If the missing vales are less than
or equal to 5, delete the rows; else if the missing values are more than 5, then fill with
median value. 3 marks
c) Use scatter plot to visualize how the demand for the product varies with the price
changes. 4
marks

Question 2 20 marks
Display the correlation between the different features of the dataset. Also using heatmap display
the correlation between the different features. 20 marks

Question 3 20 marks
Train the model using Decision Tree Classifier with features – “Total Price” and “Base Price” as
input variables and “Units Sold” as output variables. Also predict the output with the following
inputs:
Total Price: 133.00
Base Price: 140.00
20 marks

You might also like