prabhatk579/credit-card-fraud-detection-using-logistic-regression ? reverse-engineered prompt

Reverse engineered prompt

Build me a Jupyter notebook that detects whether a credit card transaction is fraudulent or not using logistic regression. I want the notebook to load the Kaggle credit card fraud dataset, turn it into a pandas data frame, and do the basic preprocessing and exploration so I can understand the data first. Please include simple visualizations for the transaction amounts, time, and feature correlations, then handle the class imbalance with undersampling, and also try a version with SMOTE so I can compare results.

Train a logistic regression model, show the confusion matrix, and print useful evaluation results like precision, recall, F1 score, accuracy, mean absolute error, and mean squared error. It would also be great to include a small tuning step with class weights so I can see if the model gets better on the test set. Keep it clear and easy to follow, with explanations in the notebook cells, and use only the common Python data science libraries. If you need anything, look up the current docs online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab