Skip to main content
. 2021 Dec 30;22(1):251. doi: 10.3390/s22010251
Algorithm 3: SVM with ANN
Input Parameters: FR → Final Route
    ONPROP → Optimized Nodes Properties as a Training Data (T),
    C → In terms of communicative and non-communicating nodes, the target/category is
Output: OR → Optimized Route for discovering a route from TX-Node to RX-Node and Malicious Nodes (M-Nodes)
1. Start Training
2. Set up the SVM training data. With RBF as the Kernel function, ONP is the total nodes optimised property.
3. For I = 1All Nodes
4.  If Property of Node (I) == Real
5.   Defined the Cat as a category of training data
6.   Cat (1) = ONPROP (I)
7.  Else
8.   Cat (2) = ONPROP (I)
9.  End—If
10. End—For
11. Train_Structure = SVMTRAIN (T, Cat, Kernel function)
12. OT= Train_Structure. Support-Vector //To find out the training data for ANN
13. Initialize the basic parameters of ANN—Number of Epochs (E) // Iterations used by ANN
         —Number of Neurons (N) // Used as a carrier in ANN
         —Performance: MSE, Gradient, Mutation, and Validation
         —Techniques: Levenberg Marquardt
         —Data Division: Random
14. For i = 1 → OT
15.   If T belongs to communicating nodes property
16. Group (1) = Properties of training data according to the real nodes
17. Else if T belongs to non-communicating nodes property
18.  Group (2) = Properties of training data according to the non-real nodes
19. Else
20. Group (3) = Extra properties of training data
21. End—If
22. End—For
23. Initialized the ANN using Training data and Group
24. MANET-Net = Newff (T, Group, N)
25. Set the training parameters according to the requirements and train the system
26. VoIP = Train (MANET-Net, Training data, Group)
  Testing:
27. Current Node = Properties of the current node in MANET -Net
28. Authentication = simulate (MANET-Net, Current Node)
29. If Authentication = True
30. Genuine Nodes do not consider as a malicious
31. Else
32. M-Nodes = Malicious Node
33. End—If
34. Create an Optimized Route, OR = FR (Genuine Nodes)
35. Return: OR as an Optimized Route (OR) and Malicious Nodes (M-Nodes)
36. End—Function