Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For Q2, you will use logistic regression to segment customers into two classes. This question is adapted from a Kaggle contest to evaluate current customers

For Q2, you will use logistic regression to segment customers into two classes. This question is adapted from a Kaggle contest to evaluate current customers for an auto dealership that is opening a new location. The dealership wishes to reliably segment customers in order to streamline marketing efforts when their new location opens. The data for these questions is contained in the file, auto_customers_two_segments.csv, which includes the following fields:

  • ID : Unique ID created by dealership (Removed from data_Q2)
  • Gender : Gender of the customer
  • Ever_Married : Marital status of the customer
  • Age : Age of the customer
  • Graduated : Is the customer a college graduate?
  • Profession : Profession of the customer
  • Work_Experience : Work experience in years
  • Spending_Score : Spending score of the customer.
  • Family_Size : Number of family members (including customer)
  • Segmentation : The marketing segment the customer is in.

Predict the accuracy of the model for each cutoff probability value. (2 Points)

  • Cutoff Probability Values : (0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8)
  • Classify each predicted value as 1 (positive/success) or 0 (negative/failure) using the cutoff probability value as a boundary.
  • Compare predicted class to expected class for each data point to calculate accuracy:Accuracy=(TP+TN)(TP+TN+FP+FN)
  • Round to three decimal places (e.g., 0.456).
  • You will have 7 calculations for accuracy here. One for each cutoff probability value.
  • NOTE : The cutoff probability value is NOT the same as the p-value when evaluating the significance of coefficients in the logistic regression model. The cutoff probability value is only used to classify predictions.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Import the data and necessary libraries Preprocess the data handle missing values encode categorical variables and split the data into training and te... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mathematical Interest Theory

Authors: Leslie Jane, James Daniel, Federer Vaaler

3rd Edition

147046568X, 978-1470465681

More Books

Students also viewed these Mathematics questions