# Modified Genetic Algorithm with Deep Learning for Fraud Transactions of Ethereum Smart Contract
## 5 Experimental Results and Discussion  
The dataset was factionalized into training and testing datasets, each having an 80% to 20% ratio, respectively, with the aid of the Python sklearn module. Selecting the appropriate hyperparameters is crucial while modeling. Only the elements that significantly affect model performance were chosen for parameter adjustment to enhance the real-time fault detection performance. Scores from the proposed framework were compared using the F1 score and precision, and the suggested framework's accuracy was evaluated.  
Additionally, Figure 7 shows that the model-based version of the proposed technique outperforms it, without sacrificing other parameters or overfitting, by offering the highest level of accuracy in addition to SVC, following the hyperparameter adjustment.  
In Table 2, the outcomes in terms of testing accuracy, training accuracy, F1 score, recall, and precision are displayed. The recall and precision came from the confusion matrix of an alternative model with an alternative classifier. It can be observed that random forest and logistic regression had the lowest accuracy of all the models.  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Parameter** & **Value** \\ \hline Nests & 80 \\ Total no. of eggs & 10 \\ Total no. of generations & 300 \\ \(P_{a_{min}}\) & 0.2 \\ \(P_{a_{max}}\) & 0.6 \\ Limit & 5 iterations \\ a step size & 1.7 \\ Mutation probability & 0.03 \\ Crossover rate & 0.75 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Parameter setting of the proposed algorithm.  
In Figure 8, the training and testing accuracy and loss are plotted against the number of epochs; this helps us to track the model's performance over time and identify patterns, or trends in the model's behavior. The testing accuracy is a measure of how well the model is able to generalize to new, unseen data. It is calculated as the proportion of correct predictions made by the model over the total number of testing examples. High testing accuracy indicates that the model is able to make accurate predictions on new data and is not overfitting to the training data. The training loss is a measure of the model's error on the training data. It is calculated as the average difference between the predicted output and the true output for all training examples. A low training loss indicates that the model is able to accurately predict the output for the training examples. In our model, the training accuracy and loss are consistently high and the testing accuracy and loss are consistently low, which indicates that the model is learning effectively and is not overfitting to the training data.  
\begin{table}
\begin{tabular}{l c c c c c} \hline \hline
**Type of Algorithm** & \begin{tabular}{c} **Training** \\ **Accuracy** \\ \end{tabular} & \begin{tabular}{c} **Testing** \\ **Accuracy** \\ \end{tabular} & \begin{tabular}{c} **F1** \\ **Score** \\ \end{tabular} & \
\begin{tabular}{c} **Recall** \\ \end{tabular} &
\begin{tabular}{c} **Precision** \\ \end{tabular} \\ \hline Logistic Regression & 86.16 & 88.69 & 86.16 & 88.4 & 92.46 \\ \hline Random Forest & 99.57 & 99.41 & 93.74 & 90.65 & 98.36 \\ \hline MLP Classifier & 97.85 & 97.07 & 88.39 & 89.49 & 92.57 \\ \hline KNN & 96.96 & 96.61 & 87.02 & 82.97 & 90.13 \\ \hline XGBoost & 97.66 & 95.76 & 94.69 & 93.37 & 96.89 \\ \hline LGBM Classifier & 96.44 & 95.89 & 93.78 & 92.15 & 99.59 \\ \hline SVC & 99.33 & 98.33 & 94.6 & 93.12 & 95.36 \\ \hline Proposed Algorithm & 99.27 & 99.71 & 96.93 & 94.62 & 97.29 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of performance of the proposed algorithm with popular published algorithms.  
Figure 7: Comparison of scores for the proposed model.