# Credit Card-Not-Present Fraud Detection and Prevention Using Big Data Analytics Algorithms
## 3 Credit Card-Not-Present Fraud Detection and Prevention Method
### Fraud Detection Process
#### 3.1.1 Dimensionality Feature Reduction
The self-information amount and information entropy of its individual variables can be defined as:  
\[I_{s}(f_{n,s})=-log_{2}(P(f_{n,s})) \tag{3}\]  
\[H_{s}(F_{s})=-\sum_{n=0}^{N}P(f_{n,s})log_{2}(P(f_{n,s})) \tag{4}\]  
The information entropy of the variables can be reduced linearly if they are independent of each other, but this is not the case. Multiple variables' training data are frequently related to one another. As a result, there is a need to use conditional self-information to reduce multiple variables at the same time, as given by:  
\[I_{s+t}(f_{n,s},f_{n,t})=-log_{2}(P(f_{n,s}|f_{n,t})) \tag{5}\]  
Random Undersampling  
It entails arbitrarily selecting examples from the majority class to be removed from the training dataset. This process is repeated until the desired class distribution is obtained. For example, an equal number of examples for each class is maintained. The RU is appropriate for dimensionality reduction features in datasets because the minority class has an uneven and adequate number of examples. Let us take a hypothesis \(\beta_{h}\colon A\times B\rightarrow[0,1]\) that relates to every example \(a_{i}\). Thus, the probability for obtaining the accurate label \(l_{j}\) or unfitting label \(l_{j}\) can be obtained as: \(\beta_{h}(a_{i},l_{j})=1\) and \(\beta_{h}(a_{i},a:\ l\
eq L_{j})=0\) then \(\beta_{h}\) has accurately predicted that the label of \(a_{i}\) is \(L_{j}\), not \(l\). Similarly, if \(\beta_{h}(a_{i},L_{j})=0\) and \(\beta_{h}(a_{i},a:\ l\
eq L_{j})=1\), \(\beta_{h}\) has inaccurately predicated that the label of the \(a_{i}\) is L. The fraud detection process is explicitly defined in Algorithm 1. ```
1.Initialization: (D),: Dataset, U: User account, A: Alert, \(t_{\mu}\): Abnormal transaction, L: Data in log, D:  Database, \(D_{\mu}\): balance dataset, \(R_{n}\): random undersampling, T: Transaction, M\({}_{\mu}\): Fraud detection model, \(t_{\mu n}\): t-distributed Stochastic Neighbor Embedding, \(P_{n}\): Principal component analysis, \(S_{n}\): Singular value decomposition, \(T\): Feature duplication
2.Input: (D)
3.Output: (A, \(t_{\mu n}\))
4.Initialization:  Do
5.Process:\(\mathbf{l_{m}}\), \(\mathbf{o}\), \(\mathbf{l_{m}}\),  Remove Y \(\rightarrow\) D,
6.Apply:\(P_{n}\), \(\mathbf{o}\), \(\mathbf{l_{m}}\), \(\mathbf{l_{m}}\), \(\mathbf{l_{m}}\), \(\



In Algorithm 1, the Step-1 shows the initialization of utilized variables. Steps-2-3 demonstrate the input and output procedures, respectively. Steps-4-11 initiate the random undersampling process to balance the dataset. Furthermore, it has been ensured that the high-dimensional dataset is reduced into a low-dimensional graph to retain the majority of the original data. Finally, feature duplication is also removed from the dataset. Step-12 starts both exploratory data analysis and predictive modelling. Step-13 uses the dataset and the logistic regression technique to train our model. Step-14 looks up the card owner in the database. Step-15 demonstrates that if the query result is not successful, then an alarm is given to Algorithm 2, otherwise the transaction is requested from the database. Steps-16-17 demonstrate the process of applying the proposed model on the given transaction to determine the nature of transaction (malicious or non-malicious). Step-18 determines if the model exhibits anomalous behavior, then it sends an alarm to Algorithm 2. Otherwise, Steps-19-20 record transactions in the dataset and end the process. Step-21 depicts the log writing procedure. Step-22 depicts the transactional process. Undersampling removes irrelevant information. Since the precise probability cannot be determined. As a result, when using undersampling to drop information, it is best to first collect statistical data on the datasets used in the experiment. The difference between two datasets must be quantified. The degree of difference must be described. As a result, the Levenshtein distance can be used to quantify the degree of separation between two character strings (such as English characters).