Research Article

Identification of V-Formations and Circular and Doughnut Formations in a Set of Moving Entities with Outliers

Listing 1

Outlier detection algorithm.
ALGORITHM: Outlier detection on a characteristic line
INPUT:  lineMembers = //Array of entities
      //Threshold for Pearson’s coefficient
     percentageOutliers //Maximum percentage of outliers permitted on lineMembers
OUTPUT:  outliers = // Array of outliers
BEGIN
 (1) Obtain the equation of the line which most suits the positions ( ) of the entities in lineMembers, see (2).
 (2) Get the maximum number of outliers permitted on lineMembers: nbrOutliers = .
 (3) Find the nbrOutliers entities in lineMembers which have the maximum distance to .
 (4) Remove from lineMembers the entities found in Step  3.
 (5) Calculate Pearson’s coefficient using positions ( ) of each entity in lineMembers:
    Pearson = PearsonCoefficient(lineMembers).
 (6) If Pearson then return in outliers the entities found in Step  3.
END