Table 2. Distribution of Processed Records. Class




Download 6 Mb.
Pdf ko'rish
bet8/16
Sana18.02.2024
Hajmi6 Mb.
#158491
1   ...   4   5   6   7   8   9   10   11   ...   16
Bog'liq
mathematics-12-00571

Table 2.
Distribution of Processed Records.
Class
Records
Normal
Normal
Normal
1,399,624
Attack
DDoS
DDoS_UDP
121567
DDoS_ICMP
67,939
DDoS_TCP
50,062
DDoS_HTTP
48,544
SQL_injection
50,826
Injection
Uploading
36,957
XSS
15,068
Vulnerability_scanner
50,026
Scanning
Port_Scanning
19,977
Fingerprinting
853
Password
49,933
Malware
Backdoor
24,026
Ransomware
9689
MITM
MITM
358
The final dataset was then divided into a ratio of 70:10:20 for the training, validation,
and testing sets, respectively. This division ensures a comprehensive evaluation of the
model across different data subsets. Further, a standard scaler was employed to normalize
the training, validation, and testing data. This normalization is crucial because it scales the


Mathematics 2024, 12, 571
14 of 26
features to a standard range, thereby preventing any feature with a high magnitude from
dominating the learning process and ensuring uniform contributions from all features.
The meticulous preprocessing of Edge-IIoTset plays a crucial role in the success of the
ensemble model. By transforming, reducing, cleaning, and normalizing the data, we ensure
that the dataset is not only representative of the real-world scenario but also primed for
effective and efficient DL, laying a robust foundation for the subsequent phases of model
training and validation.
4.5. Evaluation Metrics
For the effective evaluation of the ensemble model, we employed a tailored set of
metrics that aligned with the objectives of the IDS within IoT-based EVCS [
3
].
1.
Accuracy is quantified as the ratio of correctly predicted observations to the total
observations:
Accuracy
=
TP
+
TN
TP
+
TN
+
FP
+
FN
.
(1)
This metric offers a primary indication of the model’s overall classification perfor-
mance, particularly pertinent in datasets with balanced class distributions.
2.
Precision is the proportion of true positives among predicted positive observations:
Precision
=
TP
TP
+
FP
.
(2)
Recall is the ratio of true positive observations correctly predicted:
Recall
=
TP
TP
+
FN
.
(3)
Precision and recall are crucial in scenarios where the costs of false positives and false
negatives are significant, such as in IDS.
3.
F1-score is the harmonic mean of precision and recall, offering a balance between
the two:
F1

score
=
2

(
Recall

Precision
)
(
Recall
+
Precision
)
.
(4)
F1-score is particularly valuable in contexts where an equitable tradeoff between
precision and recall is desirable.
4.
A confusion matrix is a specific table layout that visualizes the performance of an
algorithm. This matrix provides an in-depth perspective of classification accuracy,
revealing the nature of errors, which is indispensable for refining a model.
5.
Log loss or logarithmic loss measures performance in which the prediction output is a
probability value between 0 and 1:
Log loss
= −
1
N
N

i=1
[
y
i
log
(
ˆy
i
) + (
1

y
i
)
log
(
1

ˆy
i
)]
(5)
where y
i
is the true label, and ˆy
i
is the predicted probability.
It is an essential metric for evaluating a model that outputs probabilities and assessing
the model’s confidence in its predictions.
These metrics collectively form a robust framework for evaluating the ensemble
model’s performance. By focusing on accuracy, precision, recall, F1-score, confusion matrix,
and log loss, we gain comprehensive insights into the model’s ability to accurately and
reliably detect intrusions in the specialized context of IoT-based EVCS. This approach
ensures that the model is not only effective in identifying threats but also efficient in
minimizing false alarms, which is paramount in real-world applications.


Mathematics 2024, 12, 571
15 of 26
4.6. Implementation Details
In this study, the implementation of the ensemble model was skillfully executed using
Python for its wide-ranging library support, particularly TensorFlow and Keras for DL,
alongside Scikit-learn for data preprocessing. Pandas and NumPy complement these for
effective data manipulation. Version control was meticulously managed using Git, with
the project’s codebase and version history accessible at the repository
https://github.com/
TATU-hacker/CNN-LSTM-GRU.git
, uploaded on 17 November 2023. The computational
backbone of the project was the Kaggle GPU P100 platform, known for its formidable
processing capabilities, which significantly expedited the training and inference phases.
To address the constraints of IoT environments, the ensemble model was designed
with scalability and efficiency at its core. It can adapt seamlessly to varying data volumes,
a critical feature for IoT applications. To ensure compatibility with IoT devices, known
for their limited processing capabilities, the model was optimized for computational and
memory efficiency and tailored for potential integration with edge computing, thereby
minimizing latency and reducing bandwidth requirements. This thoughtful combination
of software choices and hardware optimization ensures the model’s applicability in the
dynamic and resource-constrained landscape of IoT-based EVCS.

Download 6 Mb.
1   ...   4   5   6   7   8   9   10   11   ...   16




Download 6 Mb.
Pdf ko'rish

Bosh sahifa
Aloqalar

    Bosh sahifa



Table 2. Distribution of Processed Records. Class

Download 6 Mb.
Pdf ko'rish