Question: Objective: In this assignment, you will create a logistic regression model to classify transactions as either belonging to a new cardholder or an existing cardholder

Objective: In this assignment, you will create a logistic regression model to classify transactions as either belonging to a "new" cardholder or an "existing" cardholder based on engineered spending behavior features. Youll develop and evaluate your model using several key steps to understand its effectiveness and identify improvements.
Dataset: Credit card fraud detection dataset: cc_info.csv, transactions.csv Instructions:
1. Feature Engineering (10 Points): Engineer at least three new features that may help differentiate new cardholders from existing ones.
Be creative with your features, but also justify why you believe they would help in classification.
Add comments explaining each feature, why it is relevant, and how it is calculated.
2. Model Training (5 points)
Define the target variable new_cardholder (1 for new, 0 for existing).
Split the data into training and test sets (70% training, 30% test).
Train a logistic regression model on the training set using the engineered features.
Display the model summary, including coefficients and p-values, and explain what these mean.
3. Model Evaluation (5 points)
Predict on the test set and generate the following evaluation metrics:
Confusion Matrix
Accuracy, Precision, Recall, and F1 Score Explain what each of these metrics means in the context of the problem.
4. Model Diagnosis and Improvement (5 points) If the model does not perform well (i.e., low accuracy, over/under fitting or imbalanced precision/recall):
Identify possible reasons for poor performance (e.g., class imbalance, weak features).
Apply methods to improve the model (e.g., oversampling, undersampling, or feature selection).
5. Conclusion (5 points)- Summarize your approach, findings, and any suggestions for further improvement.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!