• Tiada Hasil Ditemukan

Analysis of Trajectory Cleaning Based on DBSCAN and CB-SMOT Clustering Algorithms

N/A
N/A
Protected

Academic year: 2022

Share "Analysis of Trajectory Cleaning Based on DBSCAN and CB-SMOT Clustering Algorithms "

Copied!
7
0
0

Tekspenuh

(1)

Analysis of Trajectory Cleaning Based on DBSCAN and CB-SMOT Clustering Algorithms

Tin Lai Lai Mon1*

1 Geographic Information System Laboratory, University of Computer Studies, Yangon, Myanmar

*Corresponding Author: tinlailaimon@ucsy.edu.mm

Accepted: 15 October 2020 | Published: 15 November 2020

_________________________________________________________________________________________

Abstract: Trajectory cleaning is essential for pre-processing GPS data. GPS data might be wrong because sometimes signals transmitted by satellites cannot be recorded accurately by GPS receivers because of the interference, weak signal, and malfunction of sensor.

Therefore, the recorded GPS point can be far from the actual location of the receiver. This inaccurate location can make strong affect to some decision-making processes based on the GPS data. In order to eliminate wrong GPS data points from the trajectory, some trajectory cleaning processes: detecting stop points, interpolating missing segments and removing inaccurate points are proposed in this paper. Moreover, the results show that pre-processing trajectory cleaning approach helps to improve the quality of trajectory clustering.

Keywords: Trajectory cleaning, detecting stop points, Interpolating missing segments _________________________________________________________________________

1. Introduction

Clustering is a processing of grouping objects with similarity. GPS data can be points or trajectory data. By clustering trajectory data, one can find clusters of objects that follow the same path or detect groups that moved together for a period of time. One can also detect a driver’s driving behaviour from his trajectory. But, in order to correctly detect his driving behaviour, the accuracy of the trajectory data is crucial. Although there are many methods of trajectory clustering, there is a lack of data pre-processing which is very important to get the result with high accuracy. Clustering algorithms can be categorized into three. They are unsupervised, supervised and semi-supervised algorithms.

In this paper, there will be three steps for cleaning trajectories: stop detection, missing segments and interpolation and inaccuracy removal. Trajectory pre-processing is evaluated by clustering both raw and the cleaned dataset and comparing results. And the results show that the proposed pre-processing gives the better quality of clustering.

2 Theoretical Background

2.1. Clustering Methods

Clustering methods can be divided into three main groups. They are model-based clustering;

distance-based clustering and visual-aided clustering. In model-based clustering data is considered as coming from a distribution that is mixture of two or more clusters. Each cluster compares to an alternate dissemination, and by and large, the conveyances are thought to be Gaussians. The parameters of each distribution are estimated by maximizing the likelihood of

(2)

method is based on the judgment by an expert and the expert will change the clustering settings with the requirement of the desired clustering output.

In this work, one of the well-known clustering algorithms, a density-based clustering algorithm called DBSCAN is used. In DBSCAN each GPS point is classified as CORE, BORDER or NOISE based on the input parameters: minimum points to cluster (minPts) and the radius (Eps). First of all, minPts is defined and if a point has at least minPts in radius (Eps), it is defined as CORE. If a point is not satisfied with the CORE criteria but it is connected to a CORE, it is defined as BORDER. Every point which is neither a CORE nor a BORDER is defined as NOISE. An example of a DBSCAN clustering is shown in Figure 1.

In this figure, minimum number of points is defined as 4. The area around the point A and the other red points in the radius (Eps) contain at least 4 points, therefore they are defined as core points. Moreover, all the red points are all reachable from one another, they form a single cluster. Points B and C are also included in the cluster because they are BORDER points. As point N is not reachable to the cluster and it is called NOISE. This algorithm will be modified in the stop detection step and during actual trajectory clustering.

Figure 1. DBSCAN Clustering

2.2 Dynamic Time Warping (DTW)

To measure the similarity between two temporal sequences used for GPS trajectory data, Dynamic Time Warping (DTW) is best suited for this research work. DTW can be applied to calculate the similarity between objects that have different speeds. The main advantage of DTW in comparison with Euclidean distance function is that it includes stretching and compression of sequences. In this paper, DTW is used as a distance function that data pre- processing can improve clustering. However, there are also other distance functions to be used.

3. Implementation of trajectory clustering

Implementation processes of trajectory clustering are shown as system flow diagram in Figure. 2. First of all, GPS points will be recorded from the mobile phone of the driver. After that, among the GPS recorded points, stop points will be detected and removed using DBSCAN and CB-SMoT algorithms. And then, some gaps among GPS points will be filled using missing segment interpolation method. Some inaccurate GPS points are also needed to remove. Finally, QMeasure of raw trajectories and cleaned trajectories will be calculated and compared.

(3)

Figure 2. System Flow Diagram

3.1. Stop Detection

There are many stop detection methods. Clustering-Based Stops and Moves of Trajectories (CB-SMoT) searches for the stop points close to the places on the path where object stops for a long time without moving those locations. In this work CB-SMoT is used to look for the stop points and remove them. The purpose of removing these stops is that many distance functions are quite sensitive to them.

In this research work, to do stop detection, three parameters Eps, minTime (duration an object stops at the same points) and stop points area will be selected automatically. In order to detect stop point, it is necessary to find core point condition first. A core point can be defined based on Eps and minTime, if Tlast (the latest timestamp) is between and Tfirst (the earliest timestamp) in the Eps-neighbourhood of the core point. The cluster is expanded with all the density-reachable points from the Eps-neighbourhood. According to the observation, it is found that Eps parameter can be easily calculated by using the average of all the distances between consecutive points of a trajectory and this average is enough to find all the major stops on a trajectory. Founded stops are shown in Figure 3(a) where p0,p1,…,pn are GPS points, G1,G2,G3 and G4 are the clusters and RC1, RC2, RC3 and RC4 are candidate stops.

After finding all the stops on the trajectory, the stops are moved and filled in the created gap with points calculated based on Missing Segment Interpolation. The comparison of GPS points before and after removing stop points is shown in the following Figure 3(b).

(4)

Figure 3(a). Stop Detection Figure 3(b). Before and After Removing Stop Points

3.2. Missing Segment Interpolation

In trajectory data, there may be some gaps because of the loss of GPS signal. Then, it is necessary to estimate missing segments (missing part of a trajectory according to a given GPS sampling rate and object’s movement direction). In this work, missing segments are emulated using a simple interpolation technique.

It is obvious that in order to fill the missing gap it just needs to connect the closest two points before and after the perceived gap. But such kind of consideration leads to the ignorance of the GPS data sampling rate. Moreover, there will be inaccurate results in finding DTW distance.

Suppose Pt and Pt+1 are consecutive points on a trajectory with time tPt and tPt+1 and suppose that φ is interpolation threshold and ψ is trajectory breaking threshold. If the time interval between tP1 and tP+1 is longer than the interpolation threshold φ, this segment is said to be

“complete”. If this difference is also greater than the trajectory breaking threshold ψ, this segment will not be interpolated. Instead, the segment will be broken down into two separate trajectories. Moreover, given trajectory will be separated into two sub trajectories if no GPS signal is received for ψ amount of time. This trajectory partitioning is performed even before stop detection. Suppose that

P – the list of points on a trajectory

Pa, Pb – the endpoints of the missing segment and N – the number of subsegments.

Then, ( )

( ) ∑ ( )

where, Dist(Pa,Pb) is the Euclidean distance between Pa and Pb.

Then, the distance between two consecutive generated points Pi and Pi+1 (where a < I < b) to fill in a missing segment is defined as:

( ) ( )

After that, N-1 points are created starting from Pa towards Pb according to the calculated distance Dist(Pi, Pi+1). After generating all required points, a timestamp for each point is added based on the number of generated segments and on the time difference between two endpoints of the missing segment. In this way, missing segments will be filled using the interpolation algorithm mentioned above. Before and after interpolation of missing segments is shown in Figure 4.

(5)

Figure 4. Before and after doing missing segment interpolations

3.3. Removing inaccurate GPS points

Some erroneous points exist in many datasets and they are also needed to remove. Erroneous points may be points which have the same coordinates but separated in time. Such kind of erroneous points cannot be found by stop detection if their timestamps is satisfied with minTime threshold value. So, the points that have the same coordinates are needed to remove.

Some trajectories with null speed and arbitrarily changing their locations with time are also needed to be removed. Moreover, after breaking down the raw dataset into separated trajectories, trajectories which give no meaningful knowledge to the final clustering are also needed to be removed. Therefore, trajectories that did not meet the threshold on the minimum number of points per trajectory are eliminated.

3.4. Calculation of QMeasure

After obtaining the clusters of raw trajectories and cleaned trajectories, it is necessary to calculate the quality measure of those two trajectory datasets. QMeasure tries to minimize the summation of squared pairwise distances between elements that belong to one cluster (Total SSE), while penalizing for incorrectly identified noise points (Noise Penalty):

∑( | ( ) | | | ∑ ( )

| |

where C is a set of clusters Ci, F is a set with noise trajectories and dtwDist(x,y) is the DTW distance between trajectories x and y. Smaller QMeasure values imply more accurate clustering.

4. Experimental Results

This research proposal is implemented based on the raw trajectory data. From the raw data, sub-trajectories are extracted. And then, those sub-trajectories are preprocessed using stop detection, missing segment interpolation and inaccurate points removing. And then, raw and cleaned datasets of several trajectories are compared to see whether cleaned trajectories actually improve clustering.

From Table 1. to Table 4, QMeasure values of Trajectory-1 and Trajectory-2 are calculated for both raw data and cleaned data. First of all, Eps value is fixed to 2000 and minPts values are changed from 2 t0 10 and QMeasure of raw data and cleaned data are calculated for both Trajectory-1 (Table 1) and Trajectory-2 (Table 2). After that, minPts value is fixed to 3 and Eps values are changed from 2000 to 10000 and QMeasure of raw data and cleaned data are calculated for both Trajectory-1 (Table 3) and Trajectory-2 (Table 4). The results show that

(6)

Table 3. QMeasure result of Trajectory-1 with Table 4. QMeasure result of Trajectory-2 with minPts=3 and Eps = 2000 to 10000 minPts=3 and Eps = 2000 to 10000

5. Conclusion

In this research work, a trajectory cleaning process using trajectory clustering methods:

DBSCAN and CB-SMoT is proposed. Before clustering, GPS dataset is cleaned using stop removal, missing segment interpolation and inaccurate point removal. The clustering quality measure shows that clustering dataset only after cleaning using the proposed method has more accurate clusters.

In our future work, it is expected to develop a trajectory clustering process which works automatically and gives more efficient results. For stop detection, users still need to give minTime value. In finding the missing points using segment interpolation, there is still needed to find a smoother interpolation method so that the estimated points are much closer to the real points.

minPts QMeasure (raw data)

QMeasure (cleaned data)

2 350 110

3 370 120

4 390 150

5 410 160

6 430 170

7 480 170

8 490 170

9 500 175

10 530 177

minPts QMeasure (raw data)

QMeasure (cleaned data)

2 155 40

3 180 42

4 190 43

5 200 43

6 210 45

7 220 45

8 230 45

9 230 45

10 230 45

Eps QMeasure (raw data)

QMeasure (cleaned data)

2000 370 125

3000 330 110

4000 290 100

5000 275 95

6000 255 90

7000 240 85

8000 220 80

9000 210 80

10000 200 0

Eps QMeasure (raw data)

QMeasure (cleaned data)

2000 180 40

3000 165 35

4000 155 33

5000 145 32

6000 125 32

7000 120 30

8000 115 27

9000 110 27

10000 105 27

(7)

References

L. O. Alvares, G. Oliveira, C. A. Heuser, and V. Bogorny (2009). A framework for trajectory data preprocessing for data mining. Int. Conf. on Software Engineering and Knowledge Engineering, 698 – 702.

G. Andrienko, N. Andrienko, S. Rinzivillo, M. Nanni, D. Pedreschi, and F. Giannotti (2009).

Interactive visual clustering of large collections of trajectories. Visual Analytics Science and Technology, 3 –10.

M. Ankerst, M. M. Breunig, H.-P. Krie gel, and J. Sander (1999). Optics: ordering points to identify the clustering structure. Proceedings of SIGMOD Int. Conf. on Management of Data, 49 – 60.

D. J. Berndt and J. Clifford (1994). Using Dynamic Time Warping to Find Patterns in Time Series. Proceedings of KDD-94: AAAI Workshop on Knowledge Discovery in Databases, 359 – 370.

Rujukan

DOKUMEN BERKAITAN

While learners associate blended learning with flexibility, connectivity, and accessibility, issues concerning blended learning continue to chart the trajectory

In autonomous vehicle, advanced vehicle control and safety systems are used to develop various assisted driving techniques that assist drivers in controlling

These well-known patterns are generated based on mathematical relations such as trajectory equation or parametric equations [17, 18] which are different with ours where

2.2.0 Trajectory of Blasphemy 2.2.1 Restriction of Blasphemy 2.2.2 Justification of Blasphemy 2.2.3 Religious Intolerance 2.2.4 Blasphemy versus Apostasy. 2.2.5 Blasphemy

In this setup, the mobile robot was equipped with the RFID reader and line following sensor on the forepart of the robot to follow the black line path

&#34;postmodern style&#34; lnfiltrate the mninstream art? What kind of aesthetic olrat&lt;'gies that thl'SC new budding Malaysian artists derived from postmodern critic?

The results of previous full-scale crash tests for guardrail systems, including the structural adequacy, the vehicle trajectory and the occupant risk factors, are collected

The developed surgical robot is operated smoother after the implementation of polynomial regression curve fitting technique in the teach path process. Finally, it is found that 9