This is my MCA project to find fraud in credit card transactions using AI. I used Python with Logistic Regression and SMOTE. The final F1 score is 77.51%, which means it catches most frauds with fewer mistakes.
- scripts/: Has the code files (
.py) to run the project. - outputs/: Has the pictures (
.png) like graphs and charts showing the results. - about.txt: Explains more about the project.
The project needs a file called creditcard.csv, but it’s too big to upload here. You can download it from this website:
- Go to Kaggle Credit Card Fraud Detection.
- Download the
creditcard.csvfile (you might need a free Kaggle account). - Save the
creditcard.csvfile in the main folder of this project (not insidescripts/oroutputs/, but next to them).
- Download all the files from this repository.
- Put the
creditcard.csvfile in the main folder. - Install Python on your computer.
- Install these tools using the terminal : pip install pandas pip install numpy pip install scikit-learn pip install imblearn pip install matplotlib pip install seaborn
- Go to the
scripts/folder and run the files in this order : python preprocess.py python train_model.py python train_smote.py python train_smote_threshold.py python f1_comparison.py python more_plots.py python workflow_comparison.py python system_design_flowchart.py - Check the
outputs/folder for the pictures showing the results !