# 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
\begin{table}
\begin{tabular}{c c} \hline
**Used Materials** & **Description** \\ \hline Cluster uptime & 0.1 s \\ \hline Cluster time zone & Almaty, Kazakhstan \\ \hline Cluster connection URL & [[http://127.0.0.1:54231](http://127.0.0.1:54231)]([http://127.0.0.1:54231](http://127.0.0.1:54231)): \\  & accessed on 17 August 2022 \\ \hline Connection proxy & none \\ \hline Internal security & False \\ \hline Platform & Python 3.4.6 \\ \hline Operating system & Ubuntu 18.04 \\ \hline RAM & 16 Gb \\ \hline ROM & 256 Gb \\ \hline Database & MySQL \\ \hline Processor & 2.4 GHz Intel Core i7 \\ \hline Environment & Visual Studio \\ \hline \end{tabular}
\end{table} 
Table 2: Used materials for conducting experiments. ### Experimental Results

Based on this dataset, an interesting result have been obtained using proposed CCFDP. The Python Plotly library is used to draw the graphical results. * Transaction amount distribution
* Normal VS Fraudulent transaction and transaction time
* Equally distributed class (legitimate VS fraudulent transactions)
* Detection of balanced and imbalanced correlation matrix
* Dimensionality feature reduction
* Validation rate
* Accuracy

Figure 4: Showing the fraudulent transaction process. #### 4.3.1 Transaction Amount Distribution

The Figure 5 shows the imbalanced distribution of the data in the dataset. It has been the most important problem to be solved in order to detect fraudulent activity. The fraudulent cases are very few, and because of that, any algorithm can miscalculate that any transaction that is requested from the database will be normal. However, in reality, it is not the case. #### 4.3.2 Normal VS Fraudulent Transaction and Transaction Time

Figure 6a,b show the distribution of transaction amount and distribution of transaction time, respectively. Figure 5: An imbalanced dataset. Figure 6: (**a**) Legitimate vs. fraudulent transaction and (**b**) the transactions and transaction time. (**a**) depicts both legitimate and fraudulent transactions. A maximum of 25,000 transactions were processed, with a maximum fraudulent transaction rate of 0.0178% observed. (**b**) depicts 18,000 transactions with transaction times for each. The transaction took a maximum of 0.000010 s to complete. The increasing time is due to an attack on the transaction during that time. #### 4.3.3 Equally Distributed Class (Legitimate vs. Fraudulent Transactions)

Figure 7 shows a balanced dataset that is used to train the model. In order to acquire this kind of dataset, we have applied the random undersampling method. This process selects the data from the majority class at random and removing them from the training dataset. The majority of class instances are discarded at random in random under-sampling until a more balanced distribution is reached. The main idea of this experiment is to randomly grab the same number of legitimate transactions as a fraudulent transaction. Furthermore, after choosing them, we create a new data frame based the information. #### 4.3.4 Detection of Balanced and Imbalanced Correlation Matrix

Figure 8a,b show the results of the imbalanced and balanced correlation matrix. This result aims to identify all features of the dataset. It has been observed in Figure 8a that the imbalanced correlation coefficients are unnoticeable. On the other, Figure 8b shows a subsample of a balanced correlation matrix that is more noticeable in a balanced dataset, which helps to identify outliers and remove redundant data. Figure 8: (**a**) shows imbalanced convolutional correlation matrix, and (**b**) shows subsample of a balanced convolutional correlation matrix. Figure 7: The balanced dataset using the random undersampling method. #### 4.3.5 Dimensionality Feature Reduction

Figure 9a-c depict the transaction distribution on the coordinate position. The transactions are based on classification results that have been clustered in the dataset. For dimensionality feature reduction, this experiment employs the t-SNE, PCA, and SVD methods.