# Edge Computing Approach for Vessel Monitoring System
## 3 Proposed Approach
### Analysis of the Speed Profile  
To know whether a vessel is fishing or not we can use its velocity patterns, given that the speed of the vessel differs when it is traveling and when it is fishing. We can verify this fact by observing the graphic shown in Figure 3, corresponding to vessel 2 of our study. The histogram allows for the recognition of two different velocity patterns, identified by two distinct distributions that are visible when the data on the velocity of each of the vessels is graphically represented. The part of the distribution showing lower average speeds corresponds to fishing activity, and the other (higher) speed observations correspond to the movement of the vessel between the port and the fishing sites. So, it is needed to isolate the first distribution's range to be able to classify the upcoming velocity's as connected to fishing or not. To isolate the first distribution, the hill-climbing algorithm [20] was used. This algorithm is a local optimization algorithm that provides a direct search. The Stochastic hill-climbing algorithm works supported in an iterative process of randomly selecting a neighbor for a candidate solution. The acceptance of the solution is conditioned by an improvement criterion concerning the previous solution. The implementation used was altered in a way that when the algorithm converges to the maximum, it will continue to find the limit of the distribution. To obtain this solution, the algorithm searches for the first local maximum that does not have a higher value in the following three points (current key + 0.5, current key + 1 and current key + 2). This way, we can find the maximum value of the fishing speed range. To find the end of the fishing speed range, the algorithm continues to sweep the histogram until the next three points are not lower than the current point. This way, we can end up with a histogram of the intended distribution as we can observe in Figure 4.  
Once the distribution corresponding to the fishing speeds has been identified, the next step is to define a range to classify the new data, minimum speed, and maximum speed. Within this range, the vessel is classified as being fishing. With this purpose, three optional procedures were considered:  
Standard variation: This solution assumes that the velocity distribution is a normal distribution. Using the distribution of the fishing velocity, it is possible to find the fishing velocity with more occurrences. Taking into consideration the standard variation, it is possible to define a distance from the mean and so the minimum population desired (explained by Chebyshev's inequality [21]) to be within the fishing range can be identified. Figure 4: Number of events of vessel velocity in knots distribution of vessel 2 after the application of the hill climbing algorithm. Kernel Density Estimation: Kernel density estimation estimates the probability of the density function by imposing a model function on every data point and then adding them together. The function applied to each data point is called a kernel function [22]. Filter: By using a filter that removes all the velocity occurrences that happen less than 10% of the maximum occurrence and isolating the occurrences that are followed, it is possible to retrieve a clean distribution of the fishing speed of a vessel. With this, it is possible to use the first and last values of the distribution to classify the new inputs. To isolate the fishing speed, the hill climb algorithm can be used, assuming that the first distribution is the fishing speed. The used procedure was performed in two parts: it started with the use of the method based on the filter to isolate the fishing speed from the remain; then, the Kernel distribution method was applied. The purpose of their use is as follows:  
Filter: In the first step, it retrieves all the velocity data from the database to create a histogram such as the one shown in Figure 3. In the next step, it uses the hill-climbing algorithm to get the minimum and the maximum value of the first distribution.