Credit Card Fraud Detection using Isolation Forest and Local Outlier Factor and their comparison. This is achieved through the outlier detection technique, and we use two algorithms namely Isolation Forest and Local Outlier Factor.
Our final output will show the precision values for both the algorithms, so that we can judge which is doing better at detecting fraudulent cases
I suggest to have anaconda jupyter notebook installed, since I have made this project on that you can view my comments, codes, and notes better. link: https://www.anaconda.com/distribution/
Dataset was not included while uploading this project. You can download the dataset from Kaggle link: https://www.kaggle.com/mlg-ulb/creditcardfraud
Further, you can refer to the Dataset.txt file for more details.
Python: 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)]
Numpy: 1.16.2
Sklearn: 0.20.3
Pandas: 0.24.2
Matplotlib: 3.0.3
Seaborn: 0.9.0
scipy: 1.2.1
- Download the dataset from the link provided
- Open the .ipynb file in the Jupyter Notebook.
- To understand what's happening, elaborative comments were included within each section of the code which will clearly guide you till the end of the program.
- Run the program and feel free to play around with the code and certain values in the code.
Pull requests are welcome.
Free