Question
Problem 2: Logistic Regression and LDA You are hired by a tour and travel agency which deals in selling holiday packages. You are provided details
Problem 2: Logistic Regression and LDA
You are hired by a tour and travel agency which deals in selling holiday packages. You are provided details of 872 employees of a company. Among these employees, some opted for the package and some didn't. You have to help the company in predicting whether an employee will opt for the package or not on the basis of the information given in the data set. Also, find out the important factors on the basis of which the company will focus on particular employees to sell their packages.
Dataset for Problem 2: Holiday_Package.csv
Data Dictionary:
Variable Name | Description |
Holiday_Package | Opted for Holiday Package yes/no? |
Salary | Employee salary |
age | Age in years |
edu | Years of formal education |
no_young_children | The number of young children (younger than 7 years) |
no_older_children | Number of older children |
foreign | foreigner Yes/No |
Please submit the python code for the below questions:
2.1 Data Ingestion: Read the dataset. Do the descriptive statistics and do null value condition check, write an inference on it. Perform Univariate and Bivariate Analysis. Do exploratory data analysis.
2.2 Do not scale the data. Encode the data (having string values) for Modelling. Data Split: Split the data into train and test (70:30). Apply Logistic Regression and LDA (linear discriminant analysis).
2.3 Performance Metrics: Check the performance of Predictions on Train and Test sets using Accuracy, Confusion Matrix, Plot ROC curve and get ROC_AUC score for each model Final Model: Compare Both the models and write inference which model is best/optimized.
2.4 Inference: Basis on these predictions, what are the insights and recommendations.
Please explain and summarise the various steps performed in this project. There should be proper business interpretation and actionable insights present.
Quality of Business Report(Please refer to the Evaluation Guidelines for Business report checklist. Marks in this criteria are at the moderator's discretion)
Holiday_Package-1.csv
Holliday_Package | Salary | age | educ | no_young_children | no_older_children | foreign | |
1 | no | 48412 | 30 | 8 | 1 | 1 | no |
2 | yes | 37207 | 45 | 8 | 0 | 1 | no |
3 | no | 58022 | 46 | 9 | 0 | 0 | no |
4 | no | 66503 | 31 | 11 | 2 | 0 | no |
5 | no | 66734 | 44 | 12 | 0 | 2 | no |
6 | yes | 61590 | 42 | 12 | 0 | 1 | no |
7 | no | 94344 | 51 | 8 | 0 | 0 | no |
8 | yes | 35987 | 32 | 8 | 0 | 2 | no |
9 | no | 41140 | 39 | 12 | 0 | 0 | no |
10 | no | 35826 | 43 | 11 | 0 | 2 | no |
11 | no | 42643 | 45 | 11 | 0 | 2 | no |
12 | no | 35157 | 60 | 12 | 0 | 0 | no |
13 | no | 75327 | 33 | 11 | 2 | 0 | no |
14 | no | 148221 | 56 | 14 | 0 | 0 | no |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started