# Method for Select Best AIS Data in Prediction Vessel Movements and Route Estimation
## 3 PreMovEst Method for Select Best AIS Data in Prediction Vessel Movements  
The PreMovEst method consists of four components, which are divided into two stages: training and discovering. For the first stage, there are three components: (i) GetAIS data; (ii) historical data collection; and (iii) the selection process of the best-routes collection. For the prediction and route estimation, there is one component: (iv) the process of finding and predicting the position of the vessel movements. We describe each of these steps in the following. Supervised learning is used to build the knowledge base. It has information linked to the sample containing almost 158,274 records for training using Artificial Neural Networks (ANN). For the application of Multivariate Imputation by Chained Equations (MICE), all records were used, including records of the actual vessel target. In addition, both techniques were used to discover the longitude and latitude in the maritime area [23]. The implementation used Flask and the prediction model used Keras framework, both in Python. The process of establishing a knowledge base is essential for training. It consists of three stages: (a) obtain the GetAIS data for vessels; (b) obtain the historical data collection; and (c) obtain the best routes collection through a Chi-squared selection process. 1. **GetAIS data. ** Our first assumption is as follows. For the development of this work, the datasets were obtained from MarineCadastre [24] in Zones 15 and 16 in the maritime area with 30 GB volume. 2. **Obtain historical data collection. ** The method involves accessing MarineCadastre [24] and selecting the year and data segment to download the metadata and their content. The resulting instances are in simplified Dublin Core format. For each obtained instance, a transformation of the Dublin Core format to text file is performed. Historical AIS data can be obtained in different ways. Our process obtains the data through a polygon calculated by departure and destination points, on which our method can be built. After the maritime area is filtered, different AIS data are included. This considerable amount of data can be reduced using a diverse time range in one-month intervals or more. In this way, it is essential to preserve the behavior of our target. If the method considered all AIS data in the maritime area, it could break the general behavior seen in other data. 3. **The best-routes collection through statistical behavior selection process. ** The method finds values with a higher weight of the mean absolute deviation to be used for classification. They match the statistical target route to detect the best routes. It is not strict because it allows having information about routes with different performance levels and precision. Indices such as precision and recall also give a good measure of performance. Precision refers to the dispersion of the set of values obtained from repeated measurements of a magnitude. The smaller is the dispersion, the greater is the accuracy. Precision is calculated with (1) \[\text{Precision}=\frac{tp}{tp+fp}\] (1) Recall is the number of true positives (tp) divided by adding the number of true positives and the number of false positives (fp). True positives are data points classified as positive by the model (meaning they are correct) and false negatives are data points that the model identifies as negative that are positive (incorrect) (2). \[\text{Recall}=\frac{tp}{tp+fn}\] (2) This technique allows selecting those characteristics of mean absolute deviation, mean, median, and standard deviation dependent on each other, based on an expected value in the target path that has the absolute values of the prediction of the complete path. This can limit the current use case method since it does not know which is the expected case for each route. The process has to find suitable routes without a sustainable basis of classification or a predefined example. iv **The process of finding and predicting the position of the vessel movements.