This repository contains a Python script that demonstrates building and evaluating fraud detection
models using various machine learning algorithms.
The code uses popular libraries like pandas
, scikit-learn
, and imbalanced-learn
.
To use this code:
-
Clone the repository:
git clone https://github.com/vishalshell/fraud-detection.git
-
Install the required Python packages:
pip install pandas scikit-learn imbalanced-learn matplotlib
-
Place your dataset file named
fraud_detection.csv
in the same directory as the script. -
Run the Python script:
python fraud_detection_model.py
- Loads and preprocesses fraud detection dataset.
- Implements Logistic Regression, Decision Tree, and Random Forest models.
- Uses SMOTE to handle class imbalance.
- Evaluates models' performance with Accuracy, Precision, Recall, and F1-score.
- Displays evaluation results and Accuracy graph.
- pandas
- scikit-learn
- imbalanced-learn
- matplotlib
Its from Kaggle and can be found at https://www.kaggle.com/datasets/chitwanmanchanda/fraudulent-transactions-data
Contributions are welcome! Feel free to open a pull request with your enhancements or bug fixes.
This code serves as a demonstration for building fraud detection models. Further enhancements and real-world data considerations are encouraged.