# CARD FRAUD

Attempts to predict credit risk as anomalies within the data.

PROPOSED WORK
By analyzing and study the above methods / techniques we come to know that we have to developed such techniques from which we have to stop the fraud in bank cards. For this I present the following two modules:
Module 1 - Detecting whether the incoming transaction is an anomaly (Distance Module).
Module 2 - Detecting anomaly by predicting the next transaction (Labeling).
MODULE 1 – DISTANCE BASED METHOD
In data mining outlier detection is mostly based on distance measures. In first module, when the new transaction occurs it is compared with the analyzed spending pattern of the user. If the transaction amount exceeds a threshold value which is obtained during the analysis of previous transactions, then the transaction is suspected to be a fraud and the secret question is asked from the user to allow continue the transaction.
1 ALGORITHM
Step 1: Identify the vendee’s spending behavior.
Step 2: Find the centroid (a,b) where a is the mean of the transaction number and b is the mean of the transaction amount.
Step 3: Find the distance between each point and the centroid using Euclidean distance formula. Euclidean distance = √(〖(ai-a)〗^2+〖(bi-b)〗^2 ), where i=1, 2, 3,…… Equation.
Step 4: Fix the maximum distance as the threshold.
Step 5: Now if a new transaction takes place repeat step 2 and 3.
Step 6: If the distance obtained is less than the threshold then the transaction is accepted else the transaction is rejected.
Step 7: The fraud is confirmed with the cardholder by asking the secret code.
Step 8: Update the threshold for every transaction.
MODULE 2 – LABEL PREDICTION METHODOLOGY
In label-prediction methodology we will give labels to every transaction as Low, Medium or High and the amount is clustered into low, medium and high and the transition probability is determined for each cluster. Two levels of anomaly detection can be obtained in this module. Initially the transaction amount is clustered using k-means clustering algorithm and the anomaly is detected when the distance is high and then the incoming new transaction is compared with the predicted range of transaction by means of maximum transition probability, if there is any deviation then it is suspected to be fraud and the secret question is asked from the user to continue the transaction.
2 ALGORITHM
Step 1: Identify the vendee’s spending behavior.
Step 2: Cluster the transaction amount of the vendee into three clusters: Low (1), Medium (2) and High (3) by K- Means clustering algorithm. At this level anomaly can be detected based on the distance.
Step 3: Now the range of transaction is (3 or 2 or 1) is obtained for every transaction amount.
Step 4: Determine the transition probability of each cluster.
Step 5: Obtain the maximum transition probability of each clusters. That is maximum transition from the cluster high is, medium or low. Similarly obtain for other clusters.
Step 6: Now the range of the incoming new transaction is found and compared with the obtained maximum transition probability.
Step 7: If the incoming transaction deviates from the predicted range then the transaction is rejected.
Step 8: The fraud is confirmed with the cardholder by asking the secret code.
Step 9: Update the transition probability for every transaction.