Credit Card Fraud Detection With Logistic Regression
Built an end-to-end fraud detection solution that combines data science, machine learning, and web development to tackle one of the most critical challenges in fintech.
The dataset has 284K+ transactions with only 0.172% fraud cases. That imbalance is the whole problem. A model that predicts "not fraud" for everything gets 99.8% accuracy and is completely useless.
Used Logistic Regression with balanced class weights to handle the imbalance. Created balance difference indicators as engineered features that significantly improved detection. The preprocessing pipeline handles scaling, feature selection, and model persistence for deployment.
Built a real-time fraud detection interface with Streamlit featuring live predictions and data visualizations. The system evaluates transactions instantly and shows confidence scores alongside each prediction.
The key technical achievement was getting meaningful recall on the fraud class without tanking precision. On imbalanced data, that tradeoff is where most naive approaches fall apart.