1 Introduction

Mobility data analysis is important to different purposes and applications. The movement of people, vehicles, ships, and hurricanes are examples of mobility data. This data are represented as a sequence of points located in space and time, called moving object trajectories.

In 2016 emerged the concept of multiple aspect trajectories [3, 10], a broader concept in which spatio-temporal points can be enriched with several semantic aspects, as shown in Fig. 1. The meaning of semantic aspect is any type of information that is neither spatial nor temporal. This information represents any aspect as the name of a visited place or Point of Interest (POI), the price or rate of the place, the weather condition, the transportation mode, the individual’s mood, etc. This new trajectory representation poses new challenges on trajectory data mining, specially in classification, which is the problem we focus in this paper.

Fig. 1.
figure 1

Example of multiple aspect trajectory.

Trajectory classification is the task of finding the class label of the moving object based on its trajectories [8]. It is important for identifying the strength level of a hurricane [8], the transportation mode of a moving object [2], the type of a vessel (cargo, fish, tourism, etc.) [8], the user that is the owner of a trajectory [5], etc. The great challenge related to multiple aspect trajectory classification is the large number and the heterogeneity of the dimensions associated to each trajectory point. Most works for trajectory classification have developed methods for a specific problem or application, and considered only space and time information, as summarized in [9]. On the contrary of traditional classification literature that propose new classifiers, trajectory classification relies on developing new methods for feature extraction to feed a classifier.

A recent method designed for robust trajectory classification and that has been specifically developed for multiple aspect trajectories is MASTERMovelets [5]. It extracts the subtrajectories that better discriminate each class, which are called movelets, and that are used as input to classification algorithms. MASTERMovelets automatically explores all possible dimension combinations in each subtrajectory of any size in the dataset, while seeking for the best subtrajectories for representing the classes. The movelets represent the behavior of a class, and they are normally frequent subtrajectories inside a class, i.e., they are movement subsequences that are recurrent patterns of a class and not common to other classes. A subtrajectory may have any length in terms of number of points, and MASTERMovelets explores all possible subtrajectory sizes (e.g. one point, two points, etc.). Indeed, it explores all dimension combinations (e.g. space; space and time; space, time and POI category, etc.) in order to choose the most discriminant ones, what makes the method very robust, but also very time consuming. Therefore, to use it on real world datasets, more efficient strategies must be developed for extracting movelets.

In this work we propose a new method for discovering movelets, that is based on [5], and uses a pivot strategy, called SUPERMovelets. The pivots are the trajectory parts (or subtrajectories) inside a class that will potentially generate the best movelet candidates. By introducing this concept, initially our approach reduces the search space for movelet discovery by computing the distance of one subtrajectory only to subtrajectories within the same class, finding the pivots. Moreover, instead of using all dimensions, our method automatically selects the number of dimensions that better characterize each class. As a consequence, the proposed method contributes to a significant dimensionality reduction in terms of movelets that will be used by the classifier for reducing the classification training time. In summary, we make the following contributions: (i) we propose a new and more efficient method for discovering movelets, maintaining similar accuracy levels; (ii) propose a smart strategy that automatically selects the best number of dimensions for each class; (iii) mitigate the curse of dimensionality problem, by reducing the number of movelets; (iv) present a robust experimental evaluation to show the computational time reduction and scalability.

The rest of the paper is organized as follows: Sect. 2 presents the main works related to multiple aspect trajectory classification, Sect. 3 presents the main concepts for understanding our approach, Sect. 4 describes our method, Sect. 5 presents the experimental evaluation, and Sect. 6 concludes the paper.

2 Related Works

Existing methods for trajectory classification do not propose new classifiers. The focus is usually on discovering a set of discriminant features that better characterize a trajectory class [4, 8, 9]. In this paper we limit the state of the art to works that consider semantic aspects of trajectories. A complete list of works for both raw and multiple aspect trajectory classification can be found in [9].

The first works to use some semantic information for classification are reported in [14, 15]. These works collected data from smartphones such as latitude, longitude, altitude, and date, plus deriving other features like speed, and matching bus or metro lines to classify the user movement in walking, running, or driving. The works of [6, 7, 19] consider only semantic dimensions. In [7] the authors use the semantics of the roads to segment trajectories for classification of vehicles. The methods presented in [6] and [19] use the POI identifier to classify the moving object.

The algorithms Movelets [4] and MASTERMovelets [5] discover relevant subtrajectories, which are called movelets, without the need of extracting other features. However, the processing time and computational cost are extremely high. The main difference between these methods is that Movelets encapsulates the distances of all trajectory dimensions in a single distance value, while MASTERMovelets (that has a higher complexity) keeps the distance of each dimension in a vector of distances, and therefore achieves a much better accuracy than Movelets when using all data dimensions. MASTERMovelets [5] was specifically developed for multiple aspect trajectory classification, and it largely outperformed state-of-the-art methods in terms of accuracy. Furthermore, the resulting movelets are interpretable, giving insights about the data, so the classification results are explainable.

The work of [16] performs much faster than Movelets [4], providing a similar classification accuracy level, but for a single dimension. When combining several dimensions, the user must manually test and select the best dimension combinations, while MASTERMovelets is able to automatically select the best dimension combinations and generate movelets with heterogeneous and different numbers and types of dimensions. Another recent work is MARC [12], which uses word embeddings and encapsulates all trajectory dimensions including space, time and semantics to feed a neural network classifier. On the spatial dimension this is the first work that uses the geoHash [11] combined to other dimensions. It reaches a very high accuracy, outperforming the Movelets [4] when using all dimensions, but as the classifier is limited to neural networks, the resulting patterns are not interpretable.

3 Basic Concepts

This section presents the main concepts that are necessary for better understanding this work, and are based on [5], as they share the same structures. We start with the concept of trajectory in Definition 1:

Definition 1

Multiple Aspect Trajectory: a multiple aspect trajectory \(T_i\) is a sequence of m elements \(T_i = \langle e_1, e_2, ..., e_m \rangle \), where each element is characterized by a set of l dimensions \(D=\{d_1, d_2, ..., d_l\}\), also called aspects.

In order to simplify the problem, we assume that all trajectory elements have the same number of aspects. Hereafter we will refer to trajectory aspects as dimensions.

The behavior patterns of moving objects are normally characterized by a trajectory part, and not an entire trajectory. A trajectory part is called subtrajectory. The subtrajectory concept is detailed in Definition 2:

Definition 2

Subtrajectory: given a trajectory \(T_i\) of size m, a subtrajectory \(s_{a,b} = \langle e_a, e_{a+1}..., e_b \rangle \) is a contiguous subsequence of \(T_i\) starting at element \(e_a\) and ending at element \(e_b\), where \(1 \le a \le b \le m\). The subtrajectory \(s_{a,b}\) can be represented by all the dimensions D or a subset of dimensions \(D' \subseteq D\). The length of the subtrajectory is defined as \(w =|s_{a,b}|\). In addition, the set of all subtrajectories of length w in \(T_i\) is represented by \(S^w_{T_i}\) , and the set of all subtrajectories of all lengths in \(T_i\) is \(S^*_{T_i}\).

To generate every possible subtrajectory from each trajectory of the dataset, it is necessary to consider all possible subtrajectory sizes and combination of dimensions. Since an element has multiple and heterogeneous dimensions, first the distances between all elements in the trajectories are calculated, as defined in Definition 3. The dimensions often store different data types, e.g., categorical, numerical and so on. Hence, using a vector of distances instead of one aggregated value enable the analysis of different dimensions combinations, and the use custom distance functions for each dimension.

Definition 3

Distance vector between two multidimensional elements: the distance between two multidimensional elements \(e_i\) and \(e_j\) represented by c dimensions is \(dist\_e(e_i , e_j)\), that returns a distance vector \(V = (v_1, v_2, ..., v_c)\), where each \(v_k = dist_k\_e(e_i, e_j)\) is the distance between the two elements at dimension k, and respects the property of symmetry \(dist_k\_e(e_i, e_j) = dist_k\_e(e_j, e_i)\).

In order to perform trajectory classification, it is necessary to seek for similarities among trajectories of the same class, and compare subtrajectories of the same length. One way is to seek a position with the minimum distance vector between a subtrajectory and a trajectory, this position is called best alignment. Furthermore, the best alignment implies pairing a subtrajectory to a trajectory either in a subset or all dimensions together. It begins with calculating distances between the elements of the subtrajectory and a trajectory \(T_i\). For subtrajectories of two or more elements, each alignment position use a representative vector of distances that is a sum of element distances for each dimension. Then, the best alignment consists in ranking the distances vector in each dimension for all possible positions, and getting the average rank of distance with the lowest value. As an example of pairing a subtrajectory into a trajectory, Fig. 2 (left) presents the best alignment of a subtrajectory (movelet candidate) in the trajectory \(T_i\), in the spatial dimension. We can see that the best alignment, highlighted with a rectangle, is the position where the distance between subtrajectory of \(\mathcal {M}_1\) and the trajectory is minimal.

Fig. 2.
figure 2

(left) Example of subtrajectory best alignment. (right) Example of split point selection for a movelet candidate with the dimensions time and POI rating.

The combination of subtrajectories with a subset of the trajectory dimensions are called movelet candidates, and they are evaluated and pruned in order to identify the most representative subtrajectories of each class. The movelet candidates are described in Definition 4:

Definition 4

Movelet Candidate: a movelet candidate \(\mathcal {M}\) from a subtrajectory \(s_{start,end}\) is a tuple \(\mathcal {M} = (T_i, start, w, C, \mathbb {W}, quality, sp)\), where \(T_i\) is a trajectory of the dataset \(\mathbf{T} \); start is the position in \(T_i\) where the subtrajectory begins, and w is the subtrajectory length (\(w = |s_{start,end}|\)); C is a subset of dimensions such that \(C \subseteq D\); \(\mathbb {W}\) is a set of pairs \((W^s_{T_j}, class_{T_j})\), where \(W^s_{T_j}\) is a distance vector of the subtrajectory \(s_{(start,end)}\) to each trajectory \({T_j}\) in \(\mathbf{T} \). The distances are calculated using the best alignment between \(s_{(start,end)}\) and each trajectory \({T_j}\); quality is a relevance score given to the candidate \(\mathcal {M}\); sp is a set of distance values, called split points, that better divide the classes used to measure the candidate relevance.

The set \(\mathbb {W}\) is the movelet candidate best alignments, it represents the distances (for each dimension) to all trajectories in the dataset, and one best alignment is selected as the split point vector sp. The split point sp is a given point that divides the multiple dimensional space. Figure 2 (right) presents an example of split point selection for a given movelet candidate extracted from the class represented by the x class. This split point is the best alignment in a trajectory of an opposite class o that best separates the classes considering dimensions together, which is a similar concept used in Support Vector Machines (SVM). In the example, we evaluate each trajectory from the o class (\(t_4, t_5, t_6\)) using the values of their best alignment to separate the classes. The split point is selected by calculating the F-score value for each trajectory that is not the target class. The chosen split point is the one point that represents the alignment between the movelet candidate and the trajectory \(t_5\), once it gives the best F-score value. After qualifying each movelet candidate, only those with the best quality, without point overlapping in the trajectory \(T_i\) from where it was extracted, are kept and are called movelets.

Definition 5

Movelet: given a trajectory \(T_i\), and a movelet candidate \(\mathcal {M}_x\) containing a subtrajectory s with \(s_{a,b} \subseteq T_i\), \(\mathcal {M}_x\) is a movelet if for each movelet candidate \(\mathcal {M}_y\) containing a subtrajectory \(u_{f,g}\) with \(u_{f,g} \subseteq T_i\) that overlaps \(s_{a,b}\) in at least one element, \(\mathcal {M}_x.quality > \mathcal {M}_y.quality\).

The output is a table \(|\mathbf {T}| \times |\mathcal {\mathbf {M}}|\) that will be used as input for training the classification algorithms. Each row of the table is a trajectory, each column is a movelet from the set of movelets M, and the table values are 1 and 0, in order to represent the presence or absence of a movelet in a trajectory. A movelet is present in a trajectory when its best alignment distances to that trajectory is lower than the split point values. It means that the movelet covers the trajectory considering the movelet dimensions C and sp values.

4 SUPERMovelets

In this Section we propose SUPERMoveletsFootnote 1, a new method for reducing the search space and the computational cost for finding movelets. Our method is inspired by [18] and [13], and finds pivots, which are the relevant trajectory parts for extracting the movelets. SUPERMovelets also automatically finds a threshold \(\lambda \) for limiting the maximum number of trajectory dimensions required in each movelet candidate, as an alternative for not exploring all dimension combinations. The pivots and maximum number of dimensions \(\lambda \) are extracted for each class individually. The SUPERMovelets can be divided in three main steps: (i) pivot finding, (ii) the automatic selection of \(\lambda \) and (iii) movelets extraction.

Fig. 3.
figure 3

Overview of our proposed method.

Figure 3 presents an overview of our method. Given a trajectory dataset \(\mathbf{T} \), the algorithm starts selecting the trajectories of one class \(\mathbf{T}' \) (step 1) for extracting the pivots. For each trajectory \(T_i\) in the class trajectory set, SUPERMovelets extracts all movelet candidates (step 2). The method calculates the relative frequency to each movelet candidate, with respect to the trajectories of the same class as \(T_i\) (step 3) and a threshold \(\tau \), the most frequent ones will become the pivot candidates. After finding the candidates, SUPERMovelets performs the pivot candidate pruning, where the ones with relative frequency less than \(\tau \) are removed (step 4). This step is detailed in Sect. 4.1. Next, it selects only the pivot candidates with higher frequency that repeats at least once in the class trajectories (step 5). We suppose that the most discriminant trajectory parts are the ones that repeat in total or partially in the trajectories of the same class. It calculates the \(\lambda \) threshold based on the common number of dimensions in the pivots (step 6), detailed in Sect. 4.2. The pivot points are compared and merged into SUPER-Pivots when they are neighbors or have overlapping points (step 7). For last (step 8), the SUPER-Pivots and the maximum number of dimensions \(\lambda \) will be used for movelet extraction following the same steps as the MASTERMovelets method, which for each trajectory outputs the movelets and aggregates the result to the class set of movelets \(\mathbf{M}' \) (step 9).

4.1 Pivot Finding

In order to reduce the number of subtrajectories tested for generating movelets, SUPERMovelets identifies the most promising ones of each class, called pivots (Definition 6). The pivots are defined by the frequency they appear in each trajectory, assuming that most frequent subtrajectories are more relevant for movelet extraction. By doing so, the movelets search space is reduced, and so is the computational cost, making trajectory classification using movelets faster and scalable. Assuming that moving objects have recurrent movement patterns, and that these patterns are more frequent in trajectories of each individual and less frequent in trajectories of other individuals, and considering several data dimensions, we hypothesize that frequent subtrajectories in a class are very discriminant and can lead to similar classification accuracy results as MASTERMovelets while reducing its computational cost.

Definition 6

Pivot Candidate: a pivot candidate is a tuple \(\mathcal {P} = (T_i,s_{(start,end)},\) \(C, \mathbb {W}, quality_{piv})\), where \(T_i\) is a trajectory from \(\mathbf{T} \); \(s_{start,end}\) is a subtrajectory extracted from \(T_i\), C is a subset with the candidate dimensions, \(C \subseteq D\); \(\mathbb {W}\) is a set of pairs \((W^s_{T_j}, class_{T_j})\), that contains the distances of the best alignment of \(\mathcal {P}\) to every trajectory \(\mathbf{T}' \) that belongs to the same class as \(T_i\). The \(W^s_{T_j}\) is a distance vector of the subtrajectory \(s_{(start,end)}\) to each trajectory \({T_j}\) in \(\mathbf{T}' \). The \(quality_{piv}\) is the relative frequency of the \(\mathcal {P}\) in its class.

The pivot candidates represent subtrajectories of different sizes and with any dimension combination from trajectories of a given class, and their quality is based on the relative frequency that they appear in the class. The quality of the pivots is measured considering all dimensions that are present in the subtrajectory that originates the pivot candidate. Equation (1) describes this quality function for a pivot candidate (\(\mathcal {P}\)) of a class:

$$\begin{aligned} quality_{piv} = \frac{\sum ^{d=|C|}_{d=1} freq_{piv}(\mathcal {P},d,\mathbf{T}' )}{|C|} \end{aligned}$$
(1)

Where C is the set of trajectory dimensions of \(\mathcal {P}\), and the quality is the average proportion that \(\mathcal {P}\) occurred in trajectories of the class in each dimension d of C. As there are different combinations of dimensions in each \(\mathcal {P}\), we measure the relative frequency as the average count that a \(\mathcal {P}\) occurred in each dimension, as described in (2).

$$\begin{aligned} freq_{piv}(\mathcal {P}, d,\mathbf{T}' ) = \frac{\sum ^{i=|\mathbf{T}' |}_{i=1} \left\{ {\begin{array}{cc} {1,} &{} \quad {W^s_{T_i}[d] = 0} \\ {0,} &{}\;\; {\text {otherwise.}} \\ \end{array} } \right. }{|\mathbf{T}' |} \end{aligned}$$
(2)

Considering that \(W^s_{T_i}[d]\) is the distance of the pivot candidate for dimension d, and that \(|\mathbf{T}' |\) is the number of trajectories of a given class. The relative frequency of \(freq_{piv}(\mathcal {P}, d,\mathbf{T}' )\) is the average occurrence of \(\mathcal {P}\) in each trajectory of its class. Figure 4 (a) presents an example of the quality given to two pivot candidates with a single dimension each, both extracted from trajectories of Class 4 in the figure, which has five trajectories in total (\(T_7\) to \(T_{11}\)). The first pivot candidate \(piv_a\) (Fig. 4a) has two points, and was extracted from trajectory \(T_7\). It occurred in trajectories \(T_7\), \(T_8\), \(T_9\) and \(T_{11}\), which represent \(80\%\) of the trajectories from Class 4, thus the quality of this pivot candidate is 0.8. The second pivot candidate \(piv_b\) has three points, and was extracted from trajectory \(T_9\). It occurred in trajectories \(T_9\) and \(T_{11}\), which represent \(40\%\) of the trajectories of Class 4, thus the quality of this pivot candidate is 0.4.

Fig. 4.
figure 4

Filtering by: (a) quality proportion of the pivot candidates; (b) redundant pivot candidates, both of the same size and trajectory dimensions.

After qualifying each pivot candidate, they are filtered by low quality and redundancy. The first filter consists in discarding pivot candidates that have quality lower than \(\tau \). The second filter consists in the application of a duplicate search function over the pivot candidates that passed from the first filter, i.e., keeping only pivot candidates that occur at least two times. Figure 4 (b) presents an example of the redundancy that is tackled by the second filter. The pivot candidates \(piv_c\) and \(piv_d\) are considered redundant when both have the same size (two trajectory points) and the same trajectory dimensions with the same values (equal POI names and equal weather conditions).

Finally, the Pivot Finding merges the resultant pivots for identifying in each trajectory which are the SUPER-Pivots. The main objective of this merging step is to identify consecutive pivots or the ones that overlap. If two pivots are consecutive in the trajectory or they share the same point (they have overlapping points), then the SUPERMovelets ensembles them into one SUPER-Pivot.

4.2 Selection of \(\lambda \) Threshold

To combine all trajectory dimensions to generate all possible subtrajectories, seeking for the best dimension combination in each movelet candidate, means that for each subtrajectory there is an explosion of dimension combinations. To limit this combinatorial explosion, the SUPERMovelets automatically selects the maximum number of dimensions that a movelet candidate can have based on the set of pivots, by counting the absolute number of dimensions that each pivot has, as given in (3). The mode of the number of dimensions present in the set of pivots of a class is chosen as the threshold \(\lambda \), given in (4). It means that the movelet candidates extracted from the trajectories of that class will not have more dimensions than \(\lambda \).

$$\begin{aligned} freq_\mathbf{P }(dim) = \sum ^{i=|\mathbf{P} |}_{i=1} \left\{ {\begin{array}{cc} {1,} &{}\quad {\mathcal {P}_i.|C| = dim} \\ {0,} &{} {\text {otherwise.}} \\ \end{array} } \right. \end{aligned}$$
(3)
$$\begin{aligned} \lambda = \mathop {{{\,\mathrm{argmax}\,}}}\limits _{{dim}} freq_\mathbf{P }(dim) \end{aligned}$$
(4)

4.3 Movelets Extraction

The last step of SUPERMovelets is to extract the movelets. This process follows the same steps as described in Sect. 3 and MASTERMovelets [5], with the difference that the movelet candidates are only extracted from the SUPER-Pivots, and the dimension combination is limited to \(\lambda \). With this, we aim to make the trajectory classification faster, scalable and to maintain the same accuracy level obtained when used the original, and larger, dataset.

5 Experimental Evaluation

We used four datasets publicly available and commonly used by state-of-the-art methods. They are check-in trajectories enriched with semantic dimensions from three different Location-Based Social Networks (LBSN). These datasets were also used in [5] to evaluate MASTERMovelets, which makes fairer and easier to compare the results. The trajectories were split in weeks in order to have many trajectory examples for each user as necessary for classification tasks. The class label is the user which is the owner of the trajectories. Table 1 shows the characteristics of each dataset, with the number of trajectories, the size of the smallest and the longest trajectory, the attributes of the dataset and their classes. All datasets have a large number of classes, ranging from 193 to 300.

Table 1. Summary of the used datasets.

Brightkite: is a social media [1] that provides the anonymized user that made the check-in, the POI semantic reference and the spatio-temporal information of where and when the check-in was made. We used a total of 300 random users for analysis, with a filter of a minimum of 10 points and maximum of 50 points per trajectory to guarantee consistency. Trajectories were enriched with the semantic information of the weekday of each check-in, and the resultant dataset has a total of 7, 911 trajectories, with trajectory sizes varying from 10 to 50 points.

Gowalla: has users around the world [1] and has the same dimensions as the Brightkite. From this dataset we also extracted a total of 300 random users, while limiting the trajectory sizes for a minimum of 10 and maximum of 50 points, also enriched with the semantic information of the weekday. The resultant dataset has a total of 5, 329 trajectories, with sizes ranging from 10 to 50 points.

Foursquare: dataset from the Foursquare social media with multiple aspect trajectories in New York, USA [17]. It provides the anonymized user that made the check-in, the POI and the spatial position in time when the check-in was made. We considered trajectories with at least 10 check-ins, resulting in 193 users for this dataset. The points were enriched with the semantic information of the weekday, the POI category from Foursquare APIFootnote 2, the numerical information of the price and rating of the POIs, and the Weather from Wunderground APIFootnote 3. The resultant dataset has a total of 3079 trajectories, with trajectory sizes varying from 10 to 144. The Foursquare Generic is composed by the same trajectories from the Foursquare NY, but it consists of a harder problem, where we removed the specific information of spatial position (lat, lon), and the specific semantics of the POI, keeping only the POI Category.

5.1 Experimental Setup

We use three evaluation metrics to assess the performance of the SUPERMovelets approach: (i) computational cost, (ii) classification Accuracy (ACC) and (iii) F-Score. The datasets were split using stratified holdout with \(70\%\) of the data for training and \(30\%\) for test. After movelet extraction, we used the Multilayer-Perceptron (MLP), as it is commonly used and achieved the best results in [5, 9]. The model was implemented using Python language, and the kerasFootnote 4 package. The MLP has a fully-connected hidden layer with 100 units, a Dropout Layer rate of 0.5, learning rate of \(10^-3\) and Output Layer with softmax activation. The network was trained using Adam Optimization to improve the learning time and to avoid categorical cross entropy loss, with 200 of batch size, and a total of 200 epochs for each training.

In the experiments, we calculated the distance for each dimension by using: (i) euclidean distance for the space, (ii) difference for the numerical, and (iii) simple equality (if is equal or not) for the semantics. The experiments were performed in an Intel(R) Core(TM) i7-6700 CPU @ 3.40 GHz, with 4 cores and main memory of 32 GB.

5.2 Results and Discussion

After running MASTERMovelets for movelet extraction with and without using SUPERMovelets, we compare the time spent for completing trajectory classification, the number of movelet candidates generated, the number of movelets extracted and the accuracy and F-Score obtained in the trajectory classification. We tested the movelet extraction with and without using the natural to log limit the size of subtrajectories (denoted by the -Log suffix) which was originally designed to improve the movelets extraction speed. Table 2 summarizes the results. As we can see, the main conclusion is that the SUPERMovelets method makes the movelet extraction at least \(70\%\) faster than the cases in which MASTERMovelets is used alone and at least \(50\%\) faster than the MASTERMovelets-Log, while maintaining the same accuracy level.

Table 2. Comparison between the number of candidates, computational time, accuracy and F-Score of each technique.

The most expressive difference in processing time is in the Brightkite dataset, where the SUPERMovelets-Log completed the task in 35 m, \(94\%\) faster than the MASTERMovelets-Log that made it in 9 h 45. The less expressive difference is found in the Foursquare NY dataset, where the SUPERMovelets-Log took 9 h 11 to finish the task, while the MASTERMovelets-Log took 18 h 41, a reduction of \(50.84\%\) in time. An important observation is that besides of the time reduction obtained, and the reduced number of movelet candidates, for any of the classification results the accuracy loss was less than \(1.00\%\) for every dataset. The fastest method, the SUPERMovelets-Log even increased the accuracy by \(0.9\%\) in the Foursquare NY dataset.

Movelet Candidate Generation Analysis. We evaluated the number of movelet candidates generated by each technique, and the subsequently number of movelets found. The most expressive difference is in the Brightkite dataset that SUPERMovelets reduced in \(94\%\), reducing at least \(53\%\) (Foursquare NY) in number of generated movelet candidates (Table 2).

The proposed method reduce the number of movelets, which are the attributes that are used for training the classifier, in at least \(65\%\) in comparison to the MASTERMovelets. For example, in the Brightkite dataset, MASTERMovelets produced a total of 54, 739 movelets, while SUPERMovelets outputted 5, 514, a reduction of \(89.92\%\), while the SUPERMovelets-Log produced 3, 540, a reduction of \(93.76\%\) compared to MASTERMovelets-Log. This means that besides reducing the movelet extraction time, it reduced also the dimensionality of the classification task, which is inherently high when using movelets. Indeed, the smallest dimensionality reduction achieved by the SUPERMovelets was \(65,81\%\) in the Foursquare Generic dataset, in which the MASTERMovelets-Log method produced 20, 068 movelets, against 6, 861 generated by SUPERMovelets, and the SUPERMovelets-Log produced 5, 399, a reduction of \(77,48\%\).

Scalability Performance Comparison. We evaluate how SUPERMovelets improves the scalability of movelet extraction over different dataset configurations. We used three synthetic datasets with different characteristics, as designed in [5]: (i) with fixed number of 200 trajectories and variation in the trajectory size from 10 to 400 points with 1 dimension, (ii) with fixed trajectory size of 50 points and variation in the number of trajectories in the dataset from 100 to 4000 trajectories with also 1 dimension, and (iii) with fixed number of 200 trajectories and fixed trajectory size of 50 points, but with variation in the number of dimensions, from 1 to 5.

Figure 5 shows the scalability results for each dataset. In any of the datasets, we can see that the time spent by MASTERMovelets increases faster than the others, requiring computational power in a greater scale as the dataset increases. On the other hand, the time spent by SUPERMovelets-Log increases in a smaller scale in every dataset, and is the faster compared technique, as it demands less computation time, with a time reduction of \(98.0\%\) in comparison to the MASTERMovelets, and \(80.48\%\) in comparison to the MASTERMovelets-Log.

Fig. 5.
figure 5

Scalability of running time varying (a) the size of the trajectories, (b) the number of trajectories and (c) the number of dimensions.

The MASTERMovelets-Log and SUPERMovelets are in middle-term, where the MASTER Movelets-Log outperforms the SUPERMovelets in the dataset of variational trajectory size presented in Fig. 5 (a), as this is the most effective scenario for limiting the movelet candidate size to the ln of the trajectory size. It is noteworthy that SUPERMovelets outperforms the MASTERMovelets-Log in the dataset of fixed trajectory size presented in Fig. 5 (b) and has a similar behavior in the dataset of varied trajectory dimensions of Fig. 5 (c).

6 Conclusion

In this paper we proposed a new method for extracting movelets, as the use of the best subtrajectories is currently a promising approach for multiple aspect trajectory classification. Both Movelets and MASTERMovelets generate subtrajectories of any size and from every position of the trajectories for finding the movelets. Our method does not generate the distance matrix of a trajectory point to all other trajectory points in the dataset, but to the points of the trajectories of a single class. It extracts movelets only from subtrajectories that occur more frequently in the trajectories of the same class, that are the SUPER-Pivots. Indeed, it limits the number of trajectory dimensions in each movelet candidate by counting the most frequent number of dimensions that appear in the class. Experimental results show that the proposed method is much faster for both extracting the movelets and building the classification models. Furthermore, scalability experiments show how well the proposed method scales compared to the state-of-the-art method for multiple aspect trajectory classification.