Due to a rapid advancement in the electronic commerce technology, the use of credit cards has dramatically increased. As credit card becomes the most popular mode of payment for both online as well as regular purchase, cases of fraud associated with it are also rising. In this paper, authors model the sequence of operations in credit card transaction processing using a hidden Markov model (HMM) and show how it can be used for the detection of frauds. An HMM is initially trained with the normal behavior of a cardholder. If an incoming credit card transaction is not accepted by the trained HMM with sufficiently high probability, it is considered to be fraudulent. At the same time, they try to ensure that genuine transactions are not rejected. We present detailed experimental results to show the effectiveness of our approach and compare it with other techniques available in the literature. This project is an implementation of this technique.
- Python 3.7.0
- Python packages:
- hidden_markov
- numpy
- pandas
- scikit_learn
First, check if you already have it installed or not.
python3 --version
If you don't have python 3 in your computer you can use the code below:
sudo apt-get update
sudo apt-get install python3
sudo pip3 install hidden_markov numpy pandas scikit_learn
If you haven't installed pip, you can use the codes below in your terminal:
sudo apt-get update
sudo apt install python3-pip
You should check and update your pip:
pip3 install --upgrade pip