Skip to main content
. 2022 Nov 25;22(23):9157. doi: 10.3390/s22239157
Algorithm 3: Machine Learning-Based Content Pre-Caching
Input: Table 1, Algorithm 1, VZoR, Geocast Network, Datatrain
Output: Target ZoR, Messages Dissimination, Network Development
Steps:
Prepare Dataset
1. Zi← Algorithm 1      ∴Get Zone from Algorithm 1
2. ZORi← Algorithm 2      ∴ZoR for dissemination from Algorithm 2
3. DataVANET  Video, Emergy Road Conditions, traffice conditions, Control messages
         ∴The originated data are captured and handled through the Manager
         nodes with road and traffic conditions captured throughout every
         incident vehicle.
4. MNMstore step 3       ∴Store data in the manager node from the real environment
5. Initialize: Vij0 & Pij0   ∴Set initial velocity and position to the initial stage
Train Model
6. for i=1 to Datatrain do   ∴Set the training data for valuable variables
7.  for j=1 to N do      ∴Calculate the prediction value for every sample dataset
8.   calculate_errorprediction Vlaues    ∴Calculate the error
9.    if!step 8
10.   Applyweighted values;
11.     MLVanet  Trained
12.   End for
13.  End for
14. Return: MLModelprecachedTrained
Test Model
15. Prepare: DataTestingprecache
16. for k=1 to M do
17.   TestDataTestingprecache PredictionResults;
18.   Captureprediction accuracy, average delay, hit ratio, throughput;
19. End for
20. Return: Graphical Results