Algorithm 2 CNN-based detection model. |
-
1:
procedure Evaluate1DCNN(X, y, )
-
2:
Input: X (network flows), y (labels), and features
-
3:
Output: Performance evaluation metrics
-
4:
Define 1D CNN architecture: set activation function, normalization, regularization, and dropout layers
-
5:
Compile 1D CNN model
-
6:
Initialize batch size, optimizer, learning rate, number of epochs (n), early stopping criteria (esc)
-
7:
for i in 1 to n do
-
8:
while (esc)
-
9:
Train 1D CNN model using training data based on features
-
10:
end while
-
11:
Evaluate the 1D CNN model and calculate metrics based on the predictions and y labels
-
12:
Return the calculated metrics
|