. Credit Card Fraud is increasing rapidly with the development of modern technology. This fraud detectio n system has been proven essential for banks and financial institution, to minimize their losses. This paper pr- oposes Credit Card Fraud Detection using clustering based on several uns- upervised Machine learning and deep learning algorithms . The method we follow to solve our problem is that we are going to plot the points into two dimensional space and some points turns out to be an outliers and some p- oints f orms a valid clusters . These outliers are poss ible number of cheaters which is nothing but the fraudulent transactions and the bank may reject t - heir credit ca rd application . And valid clusters are not cheaters therefore we are going to al locate them the credit card. So as a result we get the explicit list of customers i.e. the potential cheaters who have cheated. Thus, the clu - stering approach which will give be tter rating score can be chosen to be one of the best methods to detect fraud. In this paper, we worked with Statlog Australian Credit Card Approval Dataset in which the depend ent variables have been removed to maintain the privacy of the customers. 1 Introduction At the current state of the world, financial organizations expand the availability of financial facilities by employing of innovative services such as c redit cards, Auto - mated Teller Machines(ATM), internet and mobile banking services. Credit card is a payment card supplied to customers as a system of payment. There are lots of ad - vantages in using credit cards such as:  Ease of purchase  Keep customer credit history  Protection of Purchase In spite of all mentioned advantages, the problem of fraud is a serious issue in e-banking services that threaten credit card transactions especially. Since credit card is the most popular mode of payment, the number of fraud cases associated with it is also rising. Fraud dete ction involves identifying fraud as quickly as possible once it has been done. Fraud detection methods are continuously developed to defend crim- inals in adapting to their strategies. Fraud detection also involves identifying scarce fraud activities among numerous legitimate transa ctions as quickly as possible. Fraud detection methods are developing rapidly in order to adapt with new incoming fraud - ulent strategies across the world. But, development of new fraud detection techniques becomes more difficult due to the severe limitation of the ideas exchange in fraud de - tection. On the other hand, fraud detection is essentially a rare event pr oblem, which has been variously called outlier analysis, anomaly detection, exception mining, mini - Souvik Ghoshal Institute Of Engineer ing and Management(IEM) souvikghosal748@gmail.com Debkanya Bose Institute Of Engineer ing and Management(IEM) debkanyabose44@gmail.com Koushik Deb Institute Of Engineer ing and Management(IEM) Koushikdeb2 009@gmail.com 2 S. Gho shal, D. Bose, K. Deb ng rare classes, mining imbalanced data etc. The number of fraudulent transactions is usually a very low fraction of the total transactions. Hence the task of detecting fraud transactions in an accurate and efficient manner is fairly difficult and challengeable. For this reason ,we study methods for preventing illegal or fraudulent credit card transactions. We learnt that in 2015, [12]Ta nmay Kumar and Suvasini Panigrahi in th - eir paper proposed a hybrid approach to credit card fraud detection using fuzzy cluste - ring and neural network. It makes use of two phases. In phase one, they used a c -means clustering algorithm to generate a suspicious score of the transaction and in next phase if a transaction is suspicious it is feed into neural network to determine whether it was really fraudulent or not. In their paper the authors ‘Wen -Fang Yu’ and ‘Na Wang’ [13] proposed credit card fraud detection using outlie r mining based on distance sum. Outl- ier mining is a field of data mining which is basically used in monetary and internet fields. It deals with detecting objects that are detached from the main system i.e. the transactions that aren’t genuine. Sam Maes[15] proposed detecting frauds in credit ca - rd using two machine learning techniques namely Bayesian Netwoks and Artificial Neural Network. The paper discussed that how Bayesian networks after a sh ort train i- ng gave good results and their speed was enhanced by the use of ANN. So, we proposed some clustering techniques using some machine learning algorithm s – Simple K-means clustering, K -means clustering along with Principal Component Analysis (PCA), T -distributed Stochastic Neighbo r Embedding(t -SNE) and one deep learning Algorithm –Self Organising Map(SOM). In this paper, the framework we propose wi ll accurately find the cheater who have not followed the norms and regulation of the bank. Here we will propose several unsupervised Machine learning and deep learning algorithms which helps us to plot the clusters within the data and from the cluste rs we can easily find the outliers within the clusters and we can say that the outliers are nothing but the cheaters and the bank may reject their credit card application. So our objective is to detect the potential fraud wit - hin these applications so that means by the end we will be giving the explicit list of the customers who have cheated. 2 Credit Card Fraud Illegal use of credit card or its information without the knowledge of the owner is referred to as credit card fraud. Different credit card fraud tricks belong mainly to two groups of app lication and behavioral fraud [2 ]. Application fraud takes place when, fraudsters apply new cards from bank or issuing companies using false or other‟s information. Multiple applications may be submitted by one user with one set of user details (called duplication fraud) or different user with identical details (called identity fraud). Based on statistical data stated in [1] in 2012, the high risk countries facing credit card fraud threat is illu strated in Fig.1. Ukraine has the most fraud rate with staggering 19%, which is closely followed by Indonesia at 18.3% fraud rate. After these two, Yugoslavia with the rate of17.8% is the most risky country. The next highest fraud rate belongs to Malaysia (5.9%), Turkey (9%) and finally United States. Other countries that are prune to credit card fraud with the rate below than 1 % are not demonstrated in(Fig 1). 3 A Comparative Study on Credit Card Fraud Detection Fig. 1. High risk countries facing credit card fraud threat The dataset that we are using for fraud detection in this paper is called the Statlog Australian Credit Card Approval Dataset. This dataset is interesting because there is a g - ood mix of attributes -- continuous, nominal with small numb ers of values, and nominal with larger numbers of values. There are also a few missing values. In this dataset, the columns are the attributes i.e. the information of the customers and the rows are the cus - tomers itself. The model will identify some patter ns i.e. customers. So we will be doing some kind of customer segmentation to identify segments of customers and one of the segments will contain the customers that have potentially cheated. 3 Credit Card Fraud Detection Techniq ues In this paper, we will be using four different algorithms on our datasets and will compare the output given by each algorithm for credit card fraud detection. So the number of algorithm we will be using are as follows:  The simple K -means clustering algorithm  K-means clustering a long with Principal Component Analysis (PCA)  T- distributed Stochastic Neighbor Embedding (t -SNE)  Self Organizing Map (SOM) We will see how these above works and how they find the outliers and the valid clusters from two dimensional data space. The first three algorithms are unsupervised machine learning algorithm and the last algorithm is deep learning algorithm. .In this section we will briefly introduce these fraud detection techniques which are applied to credit card fraud detection tasks, al so the drawbacks of each approach will be discussed. Statistical Classification of Credit Card Fraud Occurrence Ukraine 19% other counry 29% Indonesia 18% United States 1% Turkey 9% Ukraine Indonesia Yugoslavia Malaysia Turkey United States other country Yugoslavia 18% Malaysia 6% 4 S. Gho shal, D. Bose, K. Deb 3.1 K-means Clustering k-means is one of the simplest unsupervised learning algorithms that solve the well known clustering problem. The procedure follows a simple and easy way to classify a given dataset through a certain number of clusters (assume k clusters) fixed. The main idea is to define k centers, one for each cluster. These centers should be placed in a cunning way because of different location causes different result. So, the bet - ter choice is to place them as much as possible far away from each other. The step is to take each point belonging to a given data set and associate it to the center. When no point is pending, the first step is complet ed and an early group age is done. At this point we need to re -calculate k new centroids as barycenter of the clusters res- ulting from the previous step. After we have these k new centroids, a new binding has to be done between the same data set points and the nearest new center. A loop has been generated. As a result of this loop we may notice that the k centers change their location step by step unti l no more changes are done or in other words centers do not move any more. 3.1.1 Flowchart for K -means - Fig 2 . An overview of K -means 3.1.2 Algorithm for K -means - Step 1: Choose the number K of clusters. Step 2: Select at random K points, the centroids (not necessarily from our datasets) Step 3 : Assign each data point to the closest centroid from the k clusters . Step 4: Compute and place the new centroid of each other. Step 5 : Reassign each data point to the new closest centroid . If any reassignment took place then go to step 4 otherwise finish . 5 A Comparative Study on Credit Card Fraud Detection Fig. 3. Fig. 4. So from the above figure we can clearly see that in (Fig. 3 ), the raw data points are plotted in two dimension space and after applying k -Means algorithm all the points that belongs the same cluster are sepa rated so from the above picture (Fig. 4 ) we can say that our data points are di vided into three clusters which share same centroid. 3.1.3 Drawbacks of K-means -  It is impossible to find the outliers from the above data.  From the (Fig. 14.) it is very clear that K m eans algorithm fails for large dimensional datasets. The problem that K -means suffers is called “curse of Dimensionality ” There are several methods by which we can reduce the dimensions but here we have used three methods to solve this problem . 3.2 K-means Clustering along with Principal Component Analysis(PCA) As the name suggests we are going to choose some principal component that has more variance than other components. PCA is an algorithm that compresses our dataset’s dimensions from a higher to lower dimensionality . It does this based on the Eigen vec - tors of the variance in our dataset. PCA is extremely used in data compression saving loads in processing time , as well as in visualizations of high dimensional data in 2 or 3 dimensions. That is very helpful when doing c luster analysis. More technically, PCA finds a new set of dimensions such that –  All the dimensions are or thogonal (and thus linearly inde pendent)  Ranked according to the variance of data along them. This means the first principal component contains the most information about the data. Mathematically how PCA is done -: Let X be a point represented in a specific given dimensional space and we are trying to convert it into another dimensional space(D’) with less number of dimensions. i,e D ----→D’ 6 S. Gho shal, D. Bose, K. Deb where(D’<D) Let us consider we have two features f1 and f2 and f1 represents hair colour of indian people and let f2 denotes the height of people if we repres ent the data in a matrix form case 1 -: Fig. 5 . After plotting the points we get -: Fig. 6. Therefore we can say that f1 has very high variance in comaparison to f2 and and we can exclude f2. Case2 -: when there is high variance in both f1 and f2 Fig. 7. 7 A Comparative Study on Credit Card Fraud Detection We have defined a new dimensional space f1’ and f2’ spread on f1’ >>f2’ So our sole objective is to find out the direction of Find the direction of f1’ and f2’ because they have maximum variance Let the number of data points be N and the numbe r of dimension be D Variance= 1 𝑁∑ (𝑢1𝑇 𝑥𝑛−𝑢1𝑇 𝑥𝑁 𝑁=1 )2 where 𝑢1𝑇 𝑥𝑛 is the projection of x n on u1 and 𝑢1𝑇 𝑥 is the mean distance . = 1 𝑁∑ 𝑢1𝑇 (𝑥𝑛−𝑥𝑁 𝑁=1 )(𝑥𝑛−𝑥)Tu1 = u1T[ 1 𝑁∑ (𝑥𝑛−𝑥𝑁 𝑁=1 ) (𝑥𝑛−𝑥) T]u1 = u1TS u 1 where S is closed form of covariance matrix We have to find the maximum to find the maximum of u1TS u 1 where the constraint is u1Tu1 =1 that means u 1 is unit vector to find this type of maximisation problem we use Lagrange Multipliers . 𝑑 𝑑𝑢1[ u1T S u1 + 𝜆(1- u1Tu1 ) ] 2Su 1- 𝜆2U1=0 S u1= 𝜆U1 𝜆= S And that means 𝜆 is the eigen value and U is the unit vector so to find the maximum variance we have to take the maximum eigen value and the eigen vector corresponding to it contains the maximum variance. So our problem reduces to find the largest eigen value and the ve ctor corresponding to it. 3.2.1 Flowchart for PCA - Fig. 8. An overview of PCA 8 S. Gho shal, D. Bose, K. Deb 3.2.2 Algorithm for PCA - Step 1: Standardize the data first. The input data are standardized or normalized to allow each attribute to fall wit - hin the same range. This step helps to ensure that larger domain attributes do not dominate attributes with smaller domains. Step 2: Calculate data point’s covariance matrix X. The purp ose of this step is to understand how the variables of the input data set variables to vary from the mean to each other, or in other words, to see if there is any relationship between them. Step 3: Calculate the Eigenvectors and their related Eigenvalues. PCA calculates k -orthogonal vectors (or) eigenvectors which provide basic standard input data. These are unit vectors, each of which points in a direction perpendicular to the others. These vectors are referred to as PCs. The input data is the linear combination of the PCs. Step 4: Sort the eigenvectors in decreasing order according to their eigenvalues. The PCs are arranged in th e descending order based on its significance (or) strength. The PCs basically provide important information about variance and serve as a new axis for the data. Step 5: Select the first k eigenvectors and that will be the new k dim ensions. Now select only the first k - PCs with the highest variance and remove the weaker PCs with the lowest variance. 3.2.3 Drawbacks of PCA -  Independent variables become less interpretable: After implementing PCA on the dataset, your original features will turn into Principal Components. Principal Components are the linear combination of your original features. Principal Components are not as readable and inter -pretable as original features.  Data standardization is must b efore PCA: We must standardize our data before implementing PCA, otherwise PCA will not be able to find the optimal Principal Components. Hence, principal components will be biased towards features with high variance, leading to false results.  Information Loss : Although Principal Components try to cover maximum variance among the features in a dataset, if we don’t select the number of Prin - cipal Components with care, it may miss some information as compared to the original list of features. 3.3 T- Distributed Stochastic Neighbor Embedding (t -SNE) The purpose of using t -SNE is same as PCA which is reducing the dimension. It models each high -dimensional object by a two - or three -dimensional point in such a way that similar objects are modeled by nearby points and dissimilar objects are modeled by distant points with high probability. The t -SNE algorithm comprises two main stages. First, t -SNE constructs a probability distribution over pairs of high - dimensional objects in such a way that similar ob jects have a high probability of being picked while dissimilar points have an extremely small probability of being 9 A Comparative Study on Credit Card Fraud Detection picked. Second, t -SNE defines a similar probability distribution over the points in the low -dimensional map, and it minimizes the Kullback –Leibler divergence (KL divergence) between the two distributions with respect to the locations of the points in the map. Note that while the original algorithm uses the Euclidean distance betw - een objects as the base of its similarity metric, this should b e changed as appropriate. 3.3.1 Flowchart of t-SNE – Fig. 9. An overview of t -SNE 3.3.2 Algorithm of t-SNE – Step 1: The algorithms starts by calculating the probability of similarity of points in high-dimensional space and calculating the probability of similarity of points in the corresponding low -dimensional space. The similarity of points is calc - ulated as the conditional probability that a point A would choose point B as its neighbor if neighbors were picked in proportion to their probability density un - der a Gaussian (normal distribution) centered at A. Step 2: It then tries to minimize the difference between these conditional probabilities (or similarities) in higher -dimensional and lower -dimensional space for a perf - ect representation of data points in lower -dimensional space. Step 3: To measure the minimization of the sum of difference of conditional probability t-SNE minimizes the sum of Kullback -Leibler divergence (KL divergence) of overall data points using a gradient descent method. 10 S. Gho shal, D. Bose, K. Deb 3.3.3 Drawbacks of t-SNE - Problems with t -SNE arise when intrinsic dimensions are higher i.e. more than 2 -3 dimensions. t -SNE has the tendency to get stuck in local optima like other gradient descent based algorithms. The basic t -SNE algorithm is slow due to nearest neighbor search queries . 3.4 Self Organizing Map (SOM) Self organizing map (SOM) is a type of Artificial Neural Network (ANN) which is one of the most popular unsupervised neural networks lear ning which was introduced by [3 ]. SOM provides a clustering method, which i s appropriate for constructing and analyzing customer profiles, in credit card frau d detection, as suggested in [4 ]. SOM operates in two phase: training and mapping. In the former phase, the map is built and weights of the neurons are updated iterati vely, based on input samples [5 ], in latter, test data is classified automatically into normal and fraudulent classes through the proced ure of mapping. As stated in [6 ], after training the SOM, new unseen transactions are compared to normal and fraud clusters, if it is similar to all normal records, it is classified as normal. New fraud ulent transacti ons are also detected similarly by the outliers. FFFF 3.4.1 Flowchart of SOM – Fig. 10 . An overview of SOM 11 A Comparative Study on Credit Card Fraud Detection 3.4.2 Algorithm of SOM – The first step in the learning process of self -organizing maps is the initialization of all weights on connections. After that, a random sample from the dataset is used as an input to the network. The network then calculates weights of which neuron are most like the input data (input vector). For this purpose, this formula is used: where n is the number of connection (weights). The map neuron with the best result is called Best Matching Unit or BMU. In an essence, this means that the input vector can be represented with this m apping neuron. Now, the self -organizing maps are not just calculating this point during the learning process, but they also try to make it “closer” to the received input data. This means that weights on this connection are updated in a manner that calculat ed distance is even smaller. Still, that is not the only thing that it is done. The weights of neighbours of BMU are also modified so they are closer to this input vector too. This is how the whole map is ‘pulled’ toward this point. For this purpose, we ha ve to know the radius of the neighbours that will be updated. This radius is initially large, but it is reduced in every iteration (epoch). So, the next step in training self -organizing maps is actually calculating mentioned radius value. Following formula is applied: where t is the current iteration, σo is the radius of the map. The λ in the formula is defined like this: where k is the number of iterations. This formula utilizes exponential decay, making radius smaller as the training goes on, which wa s the initial goal. In a nutshell, this means that every iteration through the data will bring relevant points closer to the input data. When the radius of the current iteration is calculated weights of all neurons within the radius are updated. The closer the neuron is to the BMU the more its weights are changed. This is achieved by using this formula: This is the main learning formula, and it has a few important points that should be discussed. The first one is L(t) which represents the learning rate. Similarly to the radius formula, it is utilizing exponential decay and it is getting smaller in every iteration: Apart from that, we mentioned that the weight of the neuron will be more modified if that neuron is closer to the BMU. In the formula, that is handled with the Θ(t). This value is calculated like this: Apparently, if the neuron is closer to the BMU, distBMU is smaller, and with that Θ(t) value is closer to 1. This means that the value of the weight of such neuron will be more changed. This whole procedure is repeated several times. To sum it up, these are the most important steps in the self -organizing map 12 S. Gho shal, D. Bose, K. Deb learning process:  Weight initialization  The input vector is selected from the dataset and used as an input for the network .  BMU is calculated.  The radius of neighbours that will be updated is calculated  Each weight of the neurons within the radius are adjusted to make them more like the input vector  Steps from 2 to 5 are repeated for each input vect or of the dataset Now, the self -organizing maps are not just calculating this point during the learning process, but they also try to make it “closer” to the received input data. As we can see in the (Fig. 11.) , the BMU (the large red circle) is the closest to the data point (the small red circle). As you can also see, as we drag the BMU closer to the data point, the nearby nodes are also pulled closer to that point. Fig. 11. An illustration of the training of a self -organiz ing map. The blue blob is the distribution of the training data and the small white disc is the current training data drawn from that dis - tribution. At first (left) the SOM nodes are arbitrarily positioned in the data space. The node (highlighted in yellow ) which is nearest to the training data is selected. It is moved towards the training datum, as (to a lesser extent) are its neighbours on the grid. After many iterations the grid tends to approximate the data distribution(right). 3.4.3 Drawbacks of SOM -  The major disadvantage of a SOM, is that it requires necessary and sufficient data in order to develop meaningful clusters. The weight vectors must be based on data that can successfully group and distinguish inputs. Lack of data or extraneous data in t he weight vectors will add randomness to the groupings. Finding the correct data involves determining which factors are relevant and can be a difficult or even impossible task in several problems. The ability to deter - mine a good data set is a deciding fac tor factor in determining whether to use a SOM or not.  Another problem with SOMs is that it is often difficult to obtain a perfect mapping where groupings are unique within the map. Instead, anomalies in the map often generate where two similar groupings a ppear in different areas on the same map. Clusters will often get divided into smaller clusters, creating several areas of similar neurons. This can be prevented by initializing the map well, but that is not an option if the state of the final map is not o bvious. 13 A Comparative Study on Credit Card Fraud Detection 4 Experimental Result In this paper, we are using these four algorithms which are mentioned in Section3. We have learnt the basic algorithm, flowchart and drawbacks of each techniques . In this section we will see the results of those techniques when they are implemented by using those algorithm. 4.1 Result after applying K -means Calculations for ‘k’ -: K is calculated based on decreasing value for WCSS (with in cluster sum of square) Lower the value of WCSS better will be the result after plot ting WCSS value in a graph we will get some structure like elbow and from that we can decide our number of clusters. eg -: Fig. 12. After applying elbow method in our dataset -: Fig. 13. 14 S. Gho shal, D. Bose, K. Deb So from the above graph we conclude our K value as five. And our final output -: Fig. 14. 4.2 Result after applying PCA In this graph, we can see the various clusters. Any point which is above the reference line is known as outliers. Therefore, if we identify an outlier in our data, we should examine the observatio n to understand that it is fraudulent transactions. Fig. 1 5. 15 A Comparative Study on Credit Card Fraud Detection 4.3 Result after applying t -SNE In this graph we can see that after many iterations, the clusters get well -formed and can be differentiated. Fig. 1 6. 4.4 Result after applying SOM After training the most important thing is to visualize the results i.e. to identify the outline neurons inside the map. So, what we are about to see is clearly a two dimensional grid that will contain all the final winning nodes and for each of these nodes we will get the MID(Mean Interneuron Distance) where MID of a specific winning node is the mean of the distances of all the neurons around the winning node inside a neighbourhood that we defined. And sigma is the radius of the neighbou rhood. So basically higher is the MID, then more the winning node will be far away from the neighbours . Therefore higher the MID, the more the winning node is an outlier. So we can detect the frauds by simply taking the winner nodes that have the higher M ID. That means the winning nodes will be colored by different colors in such a way that the larger is the MID, the closer to white the color will be. So for building the map, we are going to add on the map the information o f the Mean Interneuron Distance(MID) for all the winning nodes. So we will use pcolor fun - ction and we are going to add all the values of the Mean Interneuron Distances for all the winning nodes of our self -organizing map. And to get these mean distances, well we have a specific method for that, it's Distance Map Method and we just need to take the transpose of the MID matrix. So we can see in (Fig. 17.) , the self organizing map and legend on the right indicates the range of values of the MID,the Mean Inter neuron Distances. But these are normalized values,that means that the values were scaled from zero to one.And therefore now we can clearly see that the highest MIDs,the highest Mean Interneuron Distances, correspond to the white color. And on the other han d, the smallest Mean Interneuron Distances correspond to the dark colors. 16 S. Gho shal, D. Bose, K. Deb Fig. 17. Self Organizing Map We can see in (Fig. 17.) all these majority of points here with dark colors are close to each other because their MID is pretty low. So that means that all the winning nodes in the neighborhood of one winning node are close to this winning node at the center and therefore that creates clusters of winning nodes all close to each other. But, these winning nodes here have large MIDs and therefore they'r e outliers and accordingly potential frauds. To make it more effective we will add some markers to distinguish betw - een the customers who got approval and the customers who didn’t got approval. Because the customers who cheated and go t approval are more relevant targets to fraud detection than the customers who didn't get approval and cheated. So to add markers, we're going to create two markers, some red circles and some green squares. The red circles are go - ing to correspond to the c ustomers who didn't get approval. And the green squares will correspond to the customers who got approval. So obviously we can see in (Fig. 18.) outliers that are this winning nodes here which means Mean Interneuron Distance is al - most equal to one or per haps equal to one. Which clearly indicates that there is a high risk of fraud to these customers associated to these two winning nodes. Well we see that we have both cases some customers who got approval and some customers who didn't get approval because w e get a green square and also a red circle. Fig 18. Self Organizing Map with markers 17 A Comparative Study on Credit Card Fraud Detection So now, what we have to do is catch these potential cheaters in the winning nodes but in priority those who got approval because it is much more relevant to the ba - nk to catch the cheaters who got away with this. And since we actually identified two outlying winning nodes, we will use the concatenate function to concatenate the two lists of customers so that we can have a whole list of the potential cheaters. So to get explicit list of customers we are doing inverse mapping of the winning nodes to see which custo - mers are associated to this winning nodes. We can see in (Fig. 19.) , we have got the list of fraudulen t customers but this time with the real values. We get the customer IDs, whi - ch are right here and which we can use to identify the potential cheaters. Fig.19. Customers grouped under the outlier node along with their 14 attributes. Then we will give the list of potential cheaters to the bank, so now the bank side's to deal with. Their analyst will investigate this list of potential cheaters, what they will probably do is get the values of y for all these customers ID, take in priority the ones that got approved to revise the application, and then by investigating deeper, they will find out if the customer had really cheated. So the result of Self Organising Map (SOM) are the benchmark of our problem. 5 Comparative Analysis As per the comparative study, we analysed that between first two methodology, the K - means clustering along with Principal Component Analysis (PCA) is much better than simple K -means clustering algorithm because simple K -means suffers from ‘curse of dimensionality’ so it does not produce good results. But K -means clustering along with PCA improves the results of clustering by noise reduction. Although K -means clustering along with Principal Component Analysis (PCA) and T - Distributed Stoc hastic Neighbo ur Embedding (t -SNE) both are used for dime - nsionality reduction. But after analysis through comparative study we get to know that t- SNE is non -linear dimensionality reduction tech nique whereas PCA is linear dimension - nality reduction technique which means that PCA will fail to find the non -linear (solid - line) path . T-SNE is much better than PCA because PCA gets highly affected by outliers 18 S. Gho shal, D. Bose, K. Deb and so it cannot handle outliers wher eas t-SNE involves hyperparameters such as perplexity, l earning rate and number of steps and it can also handle outliers. The t -SNE algorithm works in a very different way and focuses to preserve the local distances of the high-dimensional data in some mapping to low -dimensional data. Lastly, when we analysed all the four methodolo gies we saw that the result of Self Organising Map (SOM) is much better than the other three methodologies. It is because a clustering of a data set will preserve the probability density function of the data set, but not the topological structure of the data set. This makes SOMs especially useful for visualization. By defining a secondary function which transforms a given weight vector into a colour ,we are able to visualize the topology, similarity, and the probabilit y density function of the underlying data set in a lower dimension (usually two dimensions because of the grid). As t-SNE and SOM both are used for non -linear dimensionality reduction , SOM produces better results as it is neural network based algorithm and we also saw that the map obtained in SOM is more clear and the clusters are also better. The SOM method has advantages of data compression. That is, high - dimensional space samples data are mapped into low -dimensional space while keeping the topology un changed. SOM has clear advantages in this aspect, which other wildly used methods such as PCA do not have. Our mod el achieved a accuracy of 90 % for fraud detection and the affected population ( which were considered fraud but were no t fraud ) was found to be 10 %. The results may very if we run the same jupyter notebook because intialization of the weights of the nodes of SOM grid is done by randomly selecting the records/ patterns from the input space i.e randomly selecting the records from the given datase t. Since , we have done training for 100 iterations and weights are randomly intia - lized every time, convergence may vary . We may try with different iterations like 100, 150, 200 etc. to have better convergence. We may also store the weights of the SOM fo r which we can achieve better accuracy . 6 Conclusion This is a proposed framework to handle credit card fraud detection specially in banks and in any business industry. We used various techniques to detect fraud in Credit Card transactions but we have found the results of SOM(Self Organising Map) are the benchmark of our problem. This system is capable of providing most of the essential features required to detect fraudulent and legitimate transactions. As technology changes, it becomes difficult to track the behaviour and pattern of fraudulent transactions. We have just detected the fraudulent activity but we have not prevented. Preventing known and unknown fraud in real time is not easy but it is feasible. The proposed architecture is basically designed to detect credit card fraud in online payments, and emp hasis is made to provide a fraud prevention system to verify a transaction as fraudulent or legitimate. For implementation purposes it is assumed that issuer and acquirer bank is connected to each other. If this system is to be implemented in real time sce nario then exchange of best practices and raising consumer awareness among people can be very helpful in reducing the losses caused by fraudulent transactions. Further enhancement can be done by making this system se cure with the use of certificates for both merchant and customer and as technology changes new checks can be added to understand the pattern of fraudulent transactions and to alert the respective card holders and bankers when fraud activity is identified. 19 A Comparative Study on Credit Card Fraud Detection