SlideShare a Scribd company logo
1 of 51
Download to read offline
Trajectory clustering using adaptive Euclidean
distances
Antonio Irpino, PhD
19/6/2019
Sis 2019
Dept. of Mathematics and Physics
Caserta, Italy
19/6/2019 Sis 2019 1 / 47
Introduction
Outline
β€’ We aim at clustering trajectories of
moving objects.
β€’ A k-means-like algorithm based on a
Euclidean distance between piece-wise
linear curves is used. Each trajectory is
decomposed into sub-trajectories.
β€’ The importance of each sub-trajectory is
automatically computed in the clustering
algorithm using an adaptive distances
approach.
β€’ The proposed algorithm is tested against
some workbench trajectory datasets
Some trajectories
Examples of clustered
trajectories
19/6/2019 Sis 2019 2 / 47
Trajectory
A trajectory 𝑃𝑖 is a collection of ordered pairs of data (s𝑖
𝑗, 𝑑𝑖
𝑗),
𝑗 = 1, … , 𝑇, sampled in 𝑇 time-points where s𝑖
𝑗 is a spatial location
(namely. a 2D or a 3D vector of spatial coordinates) and 𝑑𝑖
𝑗 is a
time-stamp. A trajectory can be enriched with other data recorded at
each time-point, but we don’t consider this case. Considering the order
provided by the time-stamps, a trajectory 𝑃 is described as a curve in a
2D (or 3D space).
Trajectories are everywhere
Trajectories of
β€’ pedestrians
β€’ animals
β€’ vehicles
β€’ hurricanes
β€’ …
Sensed by:
β€’ GPS systems
β€’ GSM
networks
β€’ RFID and
WiFi
β€’ …
Clustering and classification are
useful applications in
β€’ Transportation
β€’ Urban planning
β€’ Business
β€’ …
19/6/2019 Sis 2019 3 / 47
Clustering trajectories
Clustering aims at grouping objects such that
β€’ similar objects are grouped together
β€’ different objects belongs to different groups
Trajectories clustering looks for groups of trajectories, or of
sub-trajectories, such that they represent a movement pattern in the data.
When are two trajectories similar?
19/6/2019 Sis 2019 4 / 47
Different approaches to trajectory clustering
In the literature, the following two approaches represent the state of the
art of trajectory clustering:
β€’ Lee et al. [6] propose a distance between sub-trajectories, and an
algorithm implements an extension of a density based clustering for
grouping set of sub-trajectories.
β€’ Ferreira et al. [4] estimate π‘˜ vector fields associated with π‘˜ groups of
trajectories observed in a 2D space. This application, is inspired by
the problem of monitoring and predicting storm or hurricane paths.
β€’ Another approach is provided by functional data analysis where a
trajectory is considered as a curve in a 2D or 3D space. Sangalli et
al. [8] proposed a k-means type algorithm using an alignment step.1
1We do not consider alignment in this paper
19/6/2019 Sis 2019 5 / 47
What if trajectories have different time-length? Two choices.
Consider sub-trajectories:
sub-trajectories of equal lengths can be
selected and then compared
β€’ Pro: time length is preserved
β€’ Cons: computational cost can be high
Normalize lengths
time lengths are set equal to 1
β€’ Pros: trajectories are considered as a
single objects, distances are more
interpretable, computational cost is
acceptable. Averaging trajectories is
possible.
β€’ Cons: if trajectories have very different
time-lengths some biases arise
19/6/2019 Sis 2019 6 / 47
K-means of trajectories with
adaptive distances
Distances between trajectories
Some assumptions
β€’ We consider normalized trajectories.
β€’ We consider trajectories as piece-wise linear curves.
β€’ For each piece, we assume a constant relative speed.
Under these assumptions, we can consider the Euclidean distance between
two 2D trajectories2
having the same π‘˜ time-stamps normalized in [0, 1].
Given two normalized trajectories
𝑃1 = {{(π‘₯1
0, 𝑦1
0), 0}, … , {(π‘₯1
𝑗 , 𝑦1
𝑗 ), 𝜏1
𝑗 }, … , {(π‘₯1
𝑇1
, 𝑦1
𝑇1
), 1}} and
𝑃2 = {{(π‘₯2
0, 𝑦2
0), 0}, … , {(π‘₯2
𝑗 , 𝑦2
𝑗 ), 𝜏2
𝑗 }, … , {(π‘₯2
𝑇2
, 𝑦2
𝑇2
), 1}},
where 𝜏 𝑖
𝑗 =
𝑑 𝑖
π‘—βˆ’π‘‘ 𝑖
0
𝑑 𝑖
𝑇 𝑖
βˆ’π‘‘ 𝑖
0
2The trajectory is on a plane, but the extension to 3D spaces is straightforward.
19/6/2019 Sis 2019 7 / 47
Euclidean distance between two trajectories i
It is possible to express the two trajectories with a common set of πœβ€™s by
a linear interpolation. Once the two trajectories are registered such that
they have the same normalized 𝐿 ∈ [π‘šπ‘–π‘›(𝑇1, 𝑇2), (𝑇1 + 𝑇2)] time-stamps
we compute the squared Euclidean distance between 𝑃1 and 𝑃2 as
follows:
𝑑2
𝐸 (𝑃1, 𝑃2) =
1
∫
0
[(π‘₯1(𝜏) βˆ’ π‘₯2(𝜏))
2
+ (𝑦1(𝜏) βˆ’ 𝑦2(𝜏))
2
]π‘‘πœ =
=
𝐿
βˆ‘
β„“=1
(πœβ„“ βˆ’ πœβ„“βˆ’1) {
| Μ„π‘₯1(β„“) βˆ’ Μ„π‘₯2(β„“)|
2
+ | ̄𝑦1(β„“) βˆ’ ̄𝑦2(β„“)|
2
+
+1
3 [| Μ‡π‘₯1(β„“) βˆ’ Μ‡π‘₯2(β„“)|
2
+ | ̇𝑦1(β„“) βˆ’ ̇𝑦2(β„“)|
2
]
}
(1)
where:
19/6/2019 Sis 2019 8 / 47
Euclidean distance between two trajectories ii
β€’ Μ„π‘₯1(β„“) = π‘₯1(πœβ„“)+π‘₯1(πœβ„“βˆ’1)
2 , Μ„π‘₯2(β„“) = π‘₯2(πœβ„“)+π‘₯2(πœβ„“βˆ’1)
2 ,
̄𝑦1(β„“) = 𝑦1(πœβ„“)+𝑦1(πœβ„“βˆ’1)
2 , and ̄𝑦2(β„“) = 𝑦2(πœβ„“)+𝑦2(πœβ„“βˆ’1)
2 . The points
( Μ„π‘₯1(β„“), ̄𝑦1(β„“)) and ( Μ„π‘₯2(β„“), ̄𝑦2(β„“)) are, respectively, the centers of the
segment that starts from (π‘₯1(πœβ„“βˆ’1), 𝑦1(πœβ„“βˆ’1)) and arrives at
(π‘₯1(πœβ„“) , 𝑦1(πœβ„“)), respectively, the centers of the segment that starts
from (π‘₯2(πœβ„“βˆ’1) , 𝑦2(πœβ„“βˆ’1)) and arrives at (π‘₯2(πœβ„“), 𝑦2(πœβ„“));
β€’ Μ‡π‘₯1(β„“) = π‘₯1(πœβ„“)βˆ’π‘₯1(πœβ„“βˆ’1)
2 , Μ‡π‘₯2(β„“) = π‘₯2(πœβ„“)βˆ’π‘₯2(πœβ„“βˆ’1)
2 ,
̇𝑦1(β„“) = 𝑦1(πœβ„“)βˆ’π‘¦1(πœβ„“βˆ’1)
2 , and ̇𝑦2(β„“) = 𝑦2(πœβ„“)βˆ’π‘¦2(πœβ„“βˆ’1)
2 . The value
( Μ‡π‘₯1(β„“), ̇𝑦1(β„“)) and ( Μ‡π‘₯2(β„“) , ̇𝑦2(β„“)) are, respectively, the pairs of the
signed component-wise half widths of the segment that starts from
(π‘₯1(πœβ„“βˆ’1) , 𝑦1(πœβ„“βˆ’1)) and arrives at (π‘₯1(πœβ„“) , 𝑦1(πœβ„“)), respectively, of
the segment that starts from (π‘₯2(πœβ„“βˆ’1) , 𝑦2(πœβ„“βˆ’1)) and arrives at
(π‘₯2(πœβ„“) , 𝑦2(πœβ„“)).
19/6/2019 Sis 2019 9 / 47
A k-means algorithm
The (squared) Euclidean distance allows the FrΓ©chet means of a set of
trajectories, thus a k-means algorithm can be applied.
Can we compare different sub-trajectories?
β€’ In several scenarios, if could be useful to consider how mobile-objects
enter in place, how they exit and their intermediate paths.
β€’ We propose to extend the k-means algorithm by considering a
trajectory as a sequence of 𝑀 common (w.r.t. the normalized time)
sub-trajectories which is a partition of the original one.
β€’ While k-means of 𝑁 trajectories is like to do a k-means on one
(functional) variable, k-means of 𝑁 trajectories on 𝑀
sub-trajectories is like to do a k-means on 𝑀 (functional) variables.
– If the 𝑀 sub-trajectories have the same time-length, k-means of
trajectories and on sub-trajectories return the same results! So,
whats’ new!
19/6/2019 Sis 2019 10 / 47
Using adaptive distances
The hypothesis is that each sub-trajectory could have a different
importance in the clustering process.
Adaptive distances (or weighted distances)[3]
β€’ We can consider a system of weights for each sub-trajectory
reflecting the importance in the clustering process.
β€’ Using adaptive distances in a k-means algorithm as suggested in [3],
we extended the k-means algorithm for trajectories such that a
system of weights is the solution of the minimization of the criterion
function (or the cost function) of the k-means algorithm.
β€’ We propose a global weighting system (a weight for each
sub-trajectory) and a cluster-wise (a weight for each cluster) one.
Note that, weights are computed by the algorithm and not provided
by the user.
19/6/2019 Sis 2019 11 / 47
The optimized criteria
Method Criterion
K-means π‘Š πΎπ‘š =
𝐾
βˆ‘
π‘˜=1
βˆ‘
π‘–βˆˆπ‘˜
𝑑2
𝐸(𝑃𝑖, ̄𝑃 π‘˜)
SK-means π‘Š π‘†πΎπ‘š =
𝐾
βˆ‘
π‘˜=1
𝑀
βˆ‘
π‘š=1
βˆ‘
π‘–βˆˆπ‘˜
𝑑2
𝐸(𝑃𝑖,π‘š, ̄𝑃 π‘˜,π‘š)
SKADAG (Glob.
W.)
π‘Š 𝐴𝐺 =
𝐾
βˆ‘
π‘˜=1
𝑀
βˆ‘
π‘š=1
βˆ‘
π‘–βˆˆπ‘˜
πœ† π‘š β‹… 𝑑2
𝐸(𝑃𝑖,π‘š, ̄𝑃 π‘˜,π‘š) s. a
𝑀
∏
π‘š=1
πœ† π‘š = 1
SKADAL (Cl.-wise
W.)
π‘Š 𝐴𝐿
𝐾
βˆ‘
π‘˜=1
𝑀
βˆ‘
π‘š=1
βˆ‘
π‘–βˆˆπ‘˜
πœ† π‘˜,π‘š β‹… 𝑑2
𝐸(𝑃𝑖,π‘š, ̄𝑃 π‘˜,π‘š) s. a
𝑀
∏
π‘š=1
πœ† π‘˜,π‘š = 1 βˆ€π‘˜ ∈ 1, … , 𝐾
19/6/2019 Sis 2019 12 / 47
The algorithm: Initialization
0. Input: A dataset 𝑃 of normalized and registered trajectories cut at some
predefined 𝑀 normalized time-stamps. A predefined 𝐾 number of
clusters.
1. Initialization Set 𝑑 = 0
1.1 Centers selection Select randomly 𝐾 trajectories and store
them in 𝐺(0)
1.2 Fix initial weights Fix Ξ›(0) = 1
1.3 Assign Assign data to clusters according to a minimum
distance criterion, and generate the initial partition
of trajectories 𝒫(0)
1.4 Compute initial criterion Compute π‘Š
(0)
𝐴𝐺 (SKADAG) or π‘Š
(0)
𝐴𝐿
(SKADAL)
19/6/2019 Sis 2019 13 / 47
The algorithm: Iterative optimization
2. Repeat Set 𝑑 = 𝑑 + 1
2.1 Centers selection Fixed 𝒫(π‘‘βˆ’1) and Ξ›(π‘‘βˆ’1), compute the average
trajectories for each cluster and store them in 𝐺(𝑑)
2.2 Compute weights Fixed 𝒫(π‘‘βˆ’1) and 𝐺(𝑑), compute Ξ›(𝑑)
according to the constrained minimization of π‘Š
(𝑑)
𝐴𝐺
(SKADAG) or π‘Š
(𝑑)
𝐴𝐿 (SKADAL), using the
Lagrange multiplier method.
2.3 Assign Fixed 𝐺(𝑑) and Ξ›(𝑑), assign trajectories to clusters
according a minimum distance criterion w.r.t. the
average trajectories, and store the partition of
trajectories in 𝒫(𝑑).
2.4 Compute the new criterion Compute π‘Š
(𝑑)
𝐴𝐺 (SKADAG) or
π‘Š
(𝑑)
𝐴𝐿 (SKADAL) .
2.5 Verify the stopping rule If π‘Š
(𝑑)
𝐴𝐺 < π‘Š
(π‘‘βˆ’1)
𝐴𝐺 (SKADAG) or
π‘Š
(𝑑)
𝐴𝐿 < π‘Š
(𝑑)
𝐴𝐿 (SKADAL) then go to 2. else go to
3..
3. Return solution Return 𝒫(𝑑), 𝐺(𝑑), Ξ›(𝑑).
19/6/2019 Sis 2019 14 / 47
Experiments and results
Two datasets
We apply the algorithm to two datasets3
CROSS (road) dataset
CROSS is a dataset of 1, 900 trajectories of
vehicles approaching to a crossroad. The
trajectories are labeled into 19 different
types.
LABOMNI
It is a dataset describing 15 (𝐾) sets of
trajectories of 209 people in a laboratory.
3available from http://cvrr.ucsd.edu/LISA/Datasets/TrajectoryClustering/CVRR_d
ataset_trajectory_clustering.zip
19/6/2019 Sis 2019 15 / 47
Main results: external validity indices
Table 2: CROSS and LABOMNI datasets: ARI= Adjusted Rand Index,
PUR=Purity, NMI=Normalized Mutual Information
CROSS LABOMNI
N=1,900 k=19 N=209 K=15
Methods ARI PUR NMI ARI PUR NMI
K-means 0.8163 0.8389 0.9405 0.6715 0.8373 0.8248
cuts (0.15,0.85) cuts (0.005, 0.15,0.85,0.995)
K-means pieces 0.8210 0.8411 0.9443 0.8772 0.9234 0.9118
SKADAG 0.8192 0.8400 0.9426 0.8930 0.9330 0.9230
SKADAL 0.8200 0.8405 0.9433 0.8273 0.9139 0.8998
Note: algorithms based on sub-trajectories perform slightly better for CROSS and
significantly better for the LABOMNI. According to [7], we note that CROSS has less
complex trajectories than LABOMNI. Indeed, CROSS contains more regular
trajectories, since they show cars behaviors at a crossroad, while LABOMNI consists in
trajectories of people that walk almost freely in a laboratory.
19/6/2019 Sis 2019 16 / 47
LABOMNI clustering results i
In the following slides, we focus on LABOMNI dataset.
β€’ For each ground-truth class (top-left), we show the closest cluster
(bottom-left).
β€’ On the right, it is reported the respective Variance function, namely
𝑉 π‘Žπ‘Ÿ π‘˜(𝑝) =
1
𝑁 π‘˜
βˆ‘
π‘–βˆˆπΆ π‘˜
[𝑃𝑖(𝑝) βˆ’ ̄𝑃𝑖(𝑝)]
2
For comparing results, we plot the square root of the function.
β€’ We report the log of relevance weights (that sum to zero because of
the log transformation)
19/6/2019 Sis 2019 17 / 47
SKADAG Traj 1 –> Old cla 1 (8) Newcla 13 (9)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.18 -0.63 -1.42 1.11 1.12
19/6/2019 Sis 2019 18 / 47
SKADAG Traj 2 –> Old cla 2 (25) Newcla 15 (20)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.18 -0.63 -1.42 1.11 1.12
19/6/2019 Sis 2019 19 / 47
SKADAG Traj 3 –> Old cla 3 (8) Newcla 4 (11)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.18 -0.63 -1.42 1.11 1.12
19/6/2019 Sis 2019 20 / 47
SKADAG Traj 5 –> Old cla 5 (30) Newcla 9 (29)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.18 -0.63 -1.42 1.11 1.12
19/6/2019 Sis 2019 21 / 47
SKADAG Traj 6 –> Old cla 6 (36) Newcla 2 (34)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.18 -0.63 -1.42 1.11 1.12
19/6/2019 Sis 2019 22 / 47
SKADAG Traj 7 –> Old cla 7 (28) Newcla 5 (27)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.18 -0.63 -1.42 1.11 1.12
19/6/2019 Sis 2019 23 / 47
SKADAG Traj 9 –> Old cla 9 (11) Newcla 7 (12)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.18 -0.63 -1.42 1.11 1.12
19/6/2019 Sis 2019 24 / 47
SKADAG Traj 10 –> Old cla 10 (4) Newcla 10 (8)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.18 -0.63 -1.42 1.11 1.12
19/6/2019 Sis 2019 25 / 47
SKADAG Traj 11 –> Old cla 11 (20) Newcla 6 (19)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.18 -0.63 -1.42 1.11 1.12
19/6/2019 Sis 2019 26 / 47
SKADAG Traj 13 –> Old cla 13 (4) Newcla 10 (8)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.18 -0.63 -1.42 1.11 1.12
19/6/2019 Sis 2019 27 / 47
SKADAG Traj 14 –> Old cla 14 (22) Newcla 3 (22)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.18 -0.63 -1.42 1.11 1.12
19/6/2019 Sis 2019 28 / 47
SKADAG Traj 15 –> Old cla 15 (4) Newcla 12 (4)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.18 -0.63 -1.42 1.11 1.12
19/6/2019 Sis 2019 29 / 47
SKADAL Algorithm
Let’s see the SKADAL (cluster-wise adaptive distances)
19/6/2019 Sis 2019 30 / 47
SKADAL Traj 1 –> Old cla 1 (8) Newcla 1 (11)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) 2.39 2.04 -1.84 -1.12 -1.47
19/6/2019 Sis 2019 31 / 47
SKADAL Traj 2 –> Old cla 2 (25) Newcla 9 (20)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.01 -2.23 -0.51 1.45 1.30
19/6/2019 Sis 2019 32 / 47
SKADAL Traj 3 –> Old cla 3 (8) Newcla 5 (11)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.26 -1.11 -2.29 2.05 1.60
19/6/2019 Sis 2019 33 / 47
SKADAL Traj 5 –> Old cla 5 (30) Newcla 3 (25)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) 0.76 0.21 -1.93 0.58 0.38
19/6/2019 Sis 2019 34 / 47
SKADAL Traj 6 –> Old cla 6 (36) Newcla 10 (12)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -3.30 -3.15 -1.60 3.70 4.36
19/6/2019 Sis 2019 35 / 47
SKADAL Traj 6 –> Old cla 6 (36) Newcla 15 (31)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) 1.59 1.54 -1.88 -0.94 -0.32
19/6/2019 Sis 2019 36 / 47
SKADAL Traj 7 –> Old cla 7 (28) Newcla 2 (22)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -1.57 -1.47 -1.41 2.20 2.25
19/6/2019 Sis 2019 37 / 47
SKADAL Traj 7 –> Old cla 7 (28) Newcla 13 (12)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) 0.52 -1.20 -1.84 1.40 1.12
19/6/2019 Sis 2019 38 / 47
SKADAL Traj 9 –> Old cla 9 (11) Newcla 2 (22)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -1.57 -1.47 -1.41 2.20 2.25
19/6/2019 Sis 2019 39 / 47
SKADAL Traj 11 –> Old cla 11 (20) Newcla 6 (23)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) 2.99 3.47 -1.66 -2.37 -2.43
19/6/2019 Sis 2019 40 / 47
SKADAL Traj 14 –> Old cla 14 (22) Newcla 7 (22)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -0.65 -0.64 -1.54 1.92 0.91
19/6/2019 Sis 2019 41 / 47
SKADAL Traj 15 –> Old cla 15 (4) Newcla 8 (7)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
50
100
150
200
100 150 200 250
x
y
0
20
40
60
0.00 0.25 0.50 0.75 1.00
p
Vark(p)
0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1
log(𝑀) -2.11 -1.78 -0.30 2.22 1.96
19/6/2019 Sis 2019 42 / 47
Comments on LABOMNI
β€’ We see that some clusters are strange! This is due to misaligned
trajectories.
β€’ While alignment is solvable in a hierarchical clustering approach (for
example, distances matrices can be computed using warping), in a
k-mean approach is less feasible.
19/6/2019 Sis 2019 43 / 47
Conclusions
β€’ In this work
– We presented a new k-means clustering algorithm for trajectories
– We observed that using sub-trajectories improves clustering results
β€’ In perspective
– How many cuts and where to cut?
– A possible solution is to cut everywhere! I.e., we are developing and
testing a new algorithm where the πœ† are continuous.
– Alignment of trajectories in a k-means framework. Recently, some
proposal have been introduced for time-series.
– Relaxing hypothesis without losing interpretability and performances.
19/6/2019 Sis 2019 44 / 47
References i
[1] DemΕ‘ar, U., Buchin, K., Cagnacci, F., Safi, K., Speckmann, B.,
Weghe, N.V., Weiskopf, D., Weibel, R.: Analysis and visualisation of
movement: an interdisciplinary review. Movement ecology. 3:5,
(2015)
[2] Diday, E.: The dynamic clusters method in nonhierarchical
clustering. International Journal of Computer and Information
Sciences 2: 61 (1973) doi: 10.1007/BF00987153
[3] Diday, E. and Govaert, G.: Classification Automatique avec
Distances Adaptatives. R.A.I.R.O. Informatique Computer Science,
11 (4), 329-349 (1977)
19/6/2019 Sis 2019 45 / 47
References ii
[4] Ferreira, N. , Klosowski, J. T., Scheidegger, C. E. and Silva, C. T.:
Vector Field k‐Means: Clustering Trajectories by Fitting Multiple
Vector Fields. Computer Graphics Forum, 32: 201-210. (2013) doi:
10.1111/cgf.12107
[5] Jiang Bian, Dayong Tian, Yuanyan Tang, Dacheng Tao. A review of
moving object trajectory clustering algorithms. Artif Intell Rev
(2016) doi: 10.1007/s10462-016-9477-7
[6] Lee, J., Han, J., Whang, K.: Trajectory clustering: a
partition-and-group framework. Proceedings of the 2007 ACM
SIGMOD international conference on Management of data, pp.
593-604 (2007)
19/6/2019 Sis 2019 46 / 47
References iii
[7] Morris, B. T., Trivedi, M. M.:Learning Trajectory Patterns by
Clustering: Experimental Studies and Comparative Evaluation, in
Proc. IEEE Inter. Conf. on Computer Vision and Pattern Recog.,
Maimi, Florida, (2009)
[8] Sangalli, L.M., Secchi, P., Vantini, S., Vitelli, V.: K-mean alignment
for curve clustering, Computational Statistics & Data Analysis, 54,5,
1219–1233 (2010)
19/6/2019 Sis 2019 47 / 47
Thank you for your attention.
Any questions?

More Related Content

What's hot

Modeling and simulation of ducted axial fan for one dimensional flow no restr...
Modeling and simulation of ducted axial fan for one dimensional flow no restr...Modeling and simulation of ducted axial fan for one dimensional flow no restr...
Modeling and simulation of ducted axial fan for one dimensional flow no restr...iaemedu
Β 
On selection of periodic kernels parameters in time series prediction
On selection of periodic kernels parameters in time series predictionOn selection of periodic kernels parameters in time series prediction
On selection of periodic kernels parameters in time series predictioncsandit
Β 
Path based Algorithms(Term Paper)
Path based Algorithms(Term Paper)Path based Algorithms(Term Paper)
Path based Algorithms(Term Paper)pankaj kumar
Β 
Area efficient parallel LFSR for cyclic redundancy check
Area efficient parallel LFSR for cyclic redundancy check  Area efficient parallel LFSR for cyclic redundancy check
Area efficient parallel LFSR for cyclic redundancy check IJECEIAES
Β 
Lid driven cavity flow simulation using CFD & MATLAB
Lid driven cavity flow simulation using CFD & MATLABLid driven cavity flow simulation using CFD & MATLAB
Lid driven cavity flow simulation using CFD & MATLABIJSRD
Β 
I033041045
I033041045I033041045
I033041045ijceronline
Β 
Differential Amplify-and-Forward Relaying in Time-Varying Rayleigh Fading Cha...
Differential Amplify-and-Forward Relaying in Time-Varying Rayleigh Fading Cha...Differential Amplify-and-Forward Relaying in Time-Varying Rayleigh Fading Cha...
Differential Amplify-and-Forward Relaying in Time-Varying Rayleigh Fading Cha...mravendi
Β 
Numerical disperison analysis of sympletic and adi scheme
Numerical disperison analysis of sympletic and adi schemeNumerical disperison analysis of sympletic and adi scheme
Numerical disperison analysis of sympletic and adi schemexingangahu
Β 
A Load-Balanced Parallelization of AKS Algorithm
A Load-Balanced Parallelization of AKS AlgorithmA Load-Balanced Parallelization of AKS Algorithm
A Load-Balanced Parallelization of AKS AlgorithmTELKOMNIKA JOURNAL
Β 
Koptreport
KoptreportKoptreport
KoptreportKaal Nath
Β 
The power and Arnoldi methods in an algebra of circulants
The power and Arnoldi methods in an algebra of circulantsThe power and Arnoldi methods in an algebra of circulants
The power and Arnoldi methods in an algebra of circulantsDavid Gleich
Β 
Final Report
Final ReportFinal Report
Final ReportNeel Patel
Β 
MMath Paper, Canlin Zhang
MMath Paper, Canlin ZhangMMath Paper, Canlin Zhang
MMath Paper, Canlin Zhangcanlin zhang
Β 
CFD simulation of Lid driven cavity flow
CFD simulation of Lid driven cavity flowCFD simulation of Lid driven cavity flow
CFD simulation of Lid driven cavity flowIJSRD
Β 
Investigation on the Pattern Synthesis of Subarray Weights for Low EMI Applic...
Investigation on the Pattern Synthesis of Subarray Weights for Low EMI Applic...Investigation on the Pattern Synthesis of Subarray Weights for Low EMI Applic...
Investigation on the Pattern Synthesis of Subarray Weights for Low EMI Applic...IOSRJECE
Β 
Duchowski Scanpath Comparison Revisited
Duchowski Scanpath Comparison RevisitedDuchowski Scanpath Comparison Revisited
Duchowski Scanpath Comparison RevisitedKalle
Β 
T coffee algorithm dissection
T coffee algorithm dissectionT coffee algorithm dissection
T coffee algorithm dissectionGui Chen
Β 

What's hot (19)

Modeling and simulation of ducted axial fan for one dimensional flow no restr...
Modeling and simulation of ducted axial fan for one dimensional flow no restr...Modeling and simulation of ducted axial fan for one dimensional flow no restr...
Modeling and simulation of ducted axial fan for one dimensional flow no restr...
Β 
On selection of periodic kernels parameters in time series prediction
On selection of periodic kernels parameters in time series predictionOn selection of periodic kernels parameters in time series prediction
On selection of periodic kernels parameters in time series prediction
Β 
Path based Algorithms(Term Paper)
Path based Algorithms(Term Paper)Path based Algorithms(Term Paper)
Path based Algorithms(Term Paper)
Β 
Area efficient parallel LFSR for cyclic redundancy check
Area efficient parallel LFSR for cyclic redundancy check  Area efficient parallel LFSR for cyclic redundancy check
Area efficient parallel LFSR for cyclic redundancy check
Β 
Lid driven cavity flow simulation using CFD & MATLAB
Lid driven cavity flow simulation using CFD & MATLABLid driven cavity flow simulation using CFD & MATLAB
Lid driven cavity flow simulation using CFD & MATLAB
Β 
I033041045
I033041045I033041045
I033041045
Β 
Differential Amplify-and-Forward Relaying in Time-Varying Rayleigh Fading Cha...
Differential Amplify-and-Forward Relaying in Time-Varying Rayleigh Fading Cha...Differential Amplify-and-Forward Relaying in Time-Varying Rayleigh Fading Cha...
Differential Amplify-and-Forward Relaying in Time-Varying Rayleigh Fading Cha...
Β 
Numerical disperison analysis of sympletic and adi scheme
Numerical disperison analysis of sympletic and adi schemeNumerical disperison analysis of sympletic and adi scheme
Numerical disperison analysis of sympletic and adi scheme
Β 
A Load-Balanced Parallelization of AKS Algorithm
A Load-Balanced Parallelization of AKS AlgorithmA Load-Balanced Parallelization of AKS Algorithm
A Load-Balanced Parallelization of AKS Algorithm
Β 
Koptreport
KoptreportKoptreport
Koptreport
Β 
The power and Arnoldi methods in an algebra of circulants
The power and Arnoldi methods in an algebra of circulantsThe power and Arnoldi methods in an algebra of circulants
The power and Arnoldi methods in an algebra of circulants
Β 
Final Report
Final ReportFinal Report
Final Report
Β 
MMath Paper, Canlin Zhang
MMath Paper, Canlin ZhangMMath Paper, Canlin Zhang
MMath Paper, Canlin Zhang
Β 
BNL_Research_Report
BNL_Research_ReportBNL_Research_Report
BNL_Research_Report
Β 
CFD simulation of Lid driven cavity flow
CFD simulation of Lid driven cavity flowCFD simulation of Lid driven cavity flow
CFD simulation of Lid driven cavity flow
Β 
Investigation on the Pattern Synthesis of Subarray Weights for Low EMI Applic...
Investigation on the Pattern Synthesis of Subarray Weights for Low EMI Applic...Investigation on the Pattern Synthesis of Subarray Weights for Low EMI Applic...
Investigation on the Pattern Synthesis of Subarray Weights for Low EMI Applic...
Β 
Slides
SlidesSlides
Slides
Β 
Duchowski Scanpath Comparison Revisited
Duchowski Scanpath Comparison RevisitedDuchowski Scanpath Comparison Revisited
Duchowski Scanpath Comparison Revisited
Β 
T coffee algorithm dissection
T coffee algorithm dissectionT coffee algorithm dissection
T coffee algorithm dissection
Β 

Similar to Trajectory clustering using adaptive Euclidean distances

The cubic root unscented kalman filter to estimate the position and orientat...
The cubic root unscented kalman filter to estimate  the position and orientat...The cubic root unscented kalman filter to estimate  the position and orientat...
The cubic root unscented kalman filter to estimate the position and orientat...IJECEIAES
Β 
A Strategic Model For Dynamic Traffic Assignment
A Strategic Model For Dynamic Traffic AssignmentA Strategic Model For Dynamic Traffic Assignment
A Strategic Model For Dynamic Traffic AssignmentKelly Taylor
Β 
Ak03302260233
Ak03302260233Ak03302260233
Ak03302260233ijceronline
Β 
Point Placement Algorithms: An Experimental Study
Point Placement Algorithms: An Experimental StudyPoint Placement Algorithms: An Experimental Study
Point Placement Algorithms: An Experimental StudyCSCJournals
Β 
Sanny omar esa_presentation_no_video
Sanny omar esa_presentation_no_videoSanny omar esa_presentation_no_video
Sanny omar esa_presentation_no_videoAdvanced-Concepts-Team
Β 
Dce a novel delay correlation
Dce a novel delay correlationDce a novel delay correlation
Dce a novel delay correlationijdpsjournal
Β 
Design and Implementation of Mobile Map Application for Finding Shortest Dire...
Design and Implementation of Mobile Map Application for Finding Shortest Dire...Design and Implementation of Mobile Map Application for Finding Shortest Dire...
Design and Implementation of Mobile Map Application for Finding Shortest Dire...Eswar Publications
Β 
A Study of Training and Blind Equalization Algorithms for Quadrature Amplitud...
A Study of Training and Blind Equalization Algorithms for Quadrature Amplitud...A Study of Training and Blind Equalization Algorithms for Quadrature Amplitud...
A Study of Training and Blind Equalization Algorithms for Quadrature Amplitud...IRJET Journal
Β 
IRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing AlgorithmsIRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing AlgorithmsIRJET Journal
Β 
MPHIL LAKSHMANAN 1.pptx
MPHIL LAKSHMANAN 1.pptxMPHIL LAKSHMANAN 1.pptx
MPHIL LAKSHMANAN 1.pptxbrckundadam
Β 
Anisotropic Bianchi Type-III Dark Energy Model with Time-Dependent Decelerati...
Anisotropic Bianchi Type-III Dark Energy Model with Time-Dependent Decelerati...Anisotropic Bianchi Type-III Dark Energy Model with Time-Dependent Decelerati...
Anisotropic Bianchi Type-III Dark Energy Model with Time-Dependent Decelerati...IOSR Journals
Β 
The shortest not necessarily the best. other path on the basis of the optimal...
The shortest not necessarily the best. other path on the basis of the optimal...The shortest not necessarily the best. other path on the basis of the optimal...
The shortest not necessarily the best. other path on the basis of the optimal...eSAT Journals
Β 
The shortest not necessarily the best other path on the basis of the optimal ...
The shortest not necessarily the best other path on the basis of the optimal ...The shortest not necessarily the best other path on the basis of the optimal ...
The shortest not necessarily the best other path on the basis of the optimal ...eSAT Publishing House
Β 
Ou3425912596
Ou3425912596Ou3425912596
Ou3425912596IJERA Editor
Β 
Symbolic Computation via GrΓΆbner Basis
Symbolic Computation via GrΓΆbner BasisSymbolic Computation via GrΓΆbner Basis
Symbolic Computation via GrΓΆbner BasisIJERA Editor
Β 
On Selection of Periodic Kernels Parameters in Time Series Prediction
On Selection of Periodic Kernels Parameters in Time Series Prediction On Selection of Periodic Kernels Parameters in Time Series Prediction
On Selection of Periodic Kernels Parameters in Time Series Prediction cscpconf
Β 
ON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTION
ON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTIONON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTION
ON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTIONcscpconf
Β 

Similar to Trajectory clustering using adaptive Euclidean distances (20)

The cubic root unscented kalman filter to estimate the position and orientat...
The cubic root unscented kalman filter to estimate  the position and orientat...The cubic root unscented kalman filter to estimate  the position and orientat...
The cubic root unscented kalman filter to estimate the position and orientat...
Β 
A Strategic Model For Dynamic Traffic Assignment
A Strategic Model For Dynamic Traffic AssignmentA Strategic Model For Dynamic Traffic Assignment
A Strategic Model For Dynamic Traffic Assignment
Β 
Gdistance vignette
Gdistance vignetteGdistance vignette
Gdistance vignette
Β 
Ak03302260233
Ak03302260233Ak03302260233
Ak03302260233
Β 
Point Placement Algorithms: An Experimental Study
Point Placement Algorithms: An Experimental StudyPoint Placement Algorithms: An Experimental Study
Point Placement Algorithms: An Experimental Study
Β 
Sanny omar esa_presentation_no_video
Sanny omar esa_presentation_no_videoSanny omar esa_presentation_no_video
Sanny omar esa_presentation_no_video
Β 
Dce a novel delay correlation
Dce a novel delay correlationDce a novel delay correlation
Dce a novel delay correlation
Β 
Wang1998
Wang1998Wang1998
Wang1998
Β 
Design and Implementation of Mobile Map Application for Finding Shortest Dire...
Design and Implementation of Mobile Map Application for Finding Shortest Dire...Design and Implementation of Mobile Map Application for Finding Shortest Dire...
Design and Implementation of Mobile Map Application for Finding Shortest Dire...
Β 
A Study of Training and Blind Equalization Algorithms for Quadrature Amplitud...
A Study of Training and Blind Equalization Algorithms for Quadrature Amplitud...A Study of Training and Blind Equalization Algorithms for Quadrature Amplitud...
A Study of Training and Blind Equalization Algorithms for Quadrature Amplitud...
Β 
IRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing AlgorithmsIRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing Algorithms
Β 
MPHIL LAKSHMANAN 1.pptx
MPHIL LAKSHMANAN 1.pptxMPHIL LAKSHMANAN 1.pptx
MPHIL LAKSHMANAN 1.pptx
Β 
Anisotropic Bianchi Type-III Dark Energy Model with Time-Dependent Decelerati...
Anisotropic Bianchi Type-III Dark Energy Model with Time-Dependent Decelerati...Anisotropic Bianchi Type-III Dark Energy Model with Time-Dependent Decelerati...
Anisotropic Bianchi Type-III Dark Energy Model with Time-Dependent Decelerati...
Β 
The shortest not necessarily the best. other path on the basis of the optimal...
The shortest not necessarily the best. other path on the basis of the optimal...The shortest not necessarily the best. other path on the basis of the optimal...
The shortest not necessarily the best. other path on the basis of the optimal...
Β 
The shortest not necessarily the best other path on the basis of the optimal ...
The shortest not necessarily the best other path on the basis of the optimal ...The shortest not necessarily the best other path on the basis of the optimal ...
The shortest not necessarily the best other path on the basis of the optimal ...
Β 
Clustering.pptx
Clustering.pptxClustering.pptx
Clustering.pptx
Β 
Ou3425912596
Ou3425912596Ou3425912596
Ou3425912596
Β 
Symbolic Computation via GrΓΆbner Basis
Symbolic Computation via GrΓΆbner BasisSymbolic Computation via GrΓΆbner Basis
Symbolic Computation via GrΓΆbner Basis
Β 
On Selection of Periodic Kernels Parameters in Time Series Prediction
On Selection of Periodic Kernels Parameters in Time Series Prediction On Selection of Periodic Kernels Parameters in Time Series Prediction
On Selection of Periodic Kernels Parameters in Time Series Prediction
Β 
ON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTION
ON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTIONON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTION
ON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTION
Β 

Recently uploaded

VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
Β 
Full night πŸ₯΅ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night πŸ₯΅ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night πŸ₯΅ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night πŸ₯΅ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...shivangimorya083
Β 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationBoston Institute of Analytics
Β 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
Β 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
Β 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
Β 
꧁❀ Greater Noida Call Girls Delhi ❀꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❀ Greater Noida Call Girls Delhi ❀꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❀ Greater Noida Call Girls Delhi ❀꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❀ Greater Noida Call Girls Delhi ❀꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
Β 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
Β 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computationsit20ad004
Β 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...Suhani Kapoor
Β 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
Β 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
Β 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
Β 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
Β 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
Β 
High Class Call Girls Noida Sector 39 Aarushi πŸ”8264348440πŸ” Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi πŸ”8264348440πŸ” Independent Escort...High Class Call Girls Noida Sector 39 Aarushi πŸ”8264348440πŸ” Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi πŸ”8264348440πŸ” Independent Escort...soniya singh
Β 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
Β 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
Β 

Recently uploaded (20)

VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
Β 
Full night πŸ₯΅ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night πŸ₯΅ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...Full night πŸ₯΅ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Full night πŸ₯΅ Call Girls Delhi New Friends Colony {9711199171} Sanya Reddy ✌️o...
Β 
Data Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health ClassificationData Science Project: Advancements in Fetal Health Classification
Data Science Project: Advancements in Fetal Health Classification
Β 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
Β 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
Β 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
Β 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
Β 
꧁❀ Greater Noida Call Girls Delhi ❀꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❀ Greater Noida Call Girls Delhi ❀꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❀ Greater Noida Call Girls Delhi ❀꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❀ Greater Noida Call Girls Delhi ❀꧂ 9711199171 ☎️ Hard And Sexy Vip Call
Β 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
Β 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computation
Β 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
Β 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
Β 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
Β 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
Β 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Β 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Β 
High Class Call Girls Noida Sector 39 Aarushi πŸ”8264348440πŸ” Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi πŸ”8264348440πŸ” Independent Escort...High Class Call Girls Noida Sector 39 Aarushi πŸ”8264348440πŸ” Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi πŸ”8264348440πŸ” Independent Escort...
Β 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
Β 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
Β 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Β 

Trajectory clustering using adaptive Euclidean distances

  • 1. Trajectory clustering using adaptive Euclidean distances Antonio Irpino, PhD 19/6/2019 Sis 2019 Dept. of Mathematics and Physics Caserta, Italy 19/6/2019 Sis 2019 1 / 47
  • 3. Outline β€’ We aim at clustering trajectories of moving objects. β€’ A k-means-like algorithm based on a Euclidean distance between piece-wise linear curves is used. Each trajectory is decomposed into sub-trajectories. β€’ The importance of each sub-trajectory is automatically computed in the clustering algorithm using an adaptive distances approach. β€’ The proposed algorithm is tested against some workbench trajectory datasets Some trajectories Examples of clustered trajectories 19/6/2019 Sis 2019 2 / 47
  • 4. Trajectory A trajectory 𝑃𝑖 is a collection of ordered pairs of data (s𝑖 𝑗, 𝑑𝑖 𝑗), 𝑗 = 1, … , 𝑇, sampled in 𝑇 time-points where s𝑖 𝑗 is a spatial location (namely. a 2D or a 3D vector of spatial coordinates) and 𝑑𝑖 𝑗 is a time-stamp. A trajectory can be enriched with other data recorded at each time-point, but we don’t consider this case. Considering the order provided by the time-stamps, a trajectory 𝑃 is described as a curve in a 2D (or 3D space). Trajectories are everywhere Trajectories of β€’ pedestrians β€’ animals β€’ vehicles β€’ hurricanes β€’ … Sensed by: β€’ GPS systems β€’ GSM networks β€’ RFID and WiFi β€’ … Clustering and classification are useful applications in β€’ Transportation β€’ Urban planning β€’ Business β€’ … 19/6/2019 Sis 2019 3 / 47
  • 5. Clustering trajectories Clustering aims at grouping objects such that β€’ similar objects are grouped together β€’ different objects belongs to different groups Trajectories clustering looks for groups of trajectories, or of sub-trajectories, such that they represent a movement pattern in the data. When are two trajectories similar? 19/6/2019 Sis 2019 4 / 47
  • 6. Different approaches to trajectory clustering In the literature, the following two approaches represent the state of the art of trajectory clustering: β€’ Lee et al. [6] propose a distance between sub-trajectories, and an algorithm implements an extension of a density based clustering for grouping set of sub-trajectories. β€’ Ferreira et al. [4] estimate π‘˜ vector fields associated with π‘˜ groups of trajectories observed in a 2D space. This application, is inspired by the problem of monitoring and predicting storm or hurricane paths. β€’ Another approach is provided by functional data analysis where a trajectory is considered as a curve in a 2D or 3D space. Sangalli et al. [8] proposed a k-means type algorithm using an alignment step.1 1We do not consider alignment in this paper 19/6/2019 Sis 2019 5 / 47
  • 7. What if trajectories have different time-length? Two choices. Consider sub-trajectories: sub-trajectories of equal lengths can be selected and then compared β€’ Pro: time length is preserved β€’ Cons: computational cost can be high Normalize lengths time lengths are set equal to 1 β€’ Pros: trajectories are considered as a single objects, distances are more interpretable, computational cost is acceptable. Averaging trajectories is possible. β€’ Cons: if trajectories have very different time-lengths some biases arise 19/6/2019 Sis 2019 6 / 47
  • 8. K-means of trajectories with adaptive distances
  • 9. Distances between trajectories Some assumptions β€’ We consider normalized trajectories. β€’ We consider trajectories as piece-wise linear curves. β€’ For each piece, we assume a constant relative speed. Under these assumptions, we can consider the Euclidean distance between two 2D trajectories2 having the same π‘˜ time-stamps normalized in [0, 1]. Given two normalized trajectories 𝑃1 = {{(π‘₯1 0, 𝑦1 0), 0}, … , {(π‘₯1 𝑗 , 𝑦1 𝑗 ), 𝜏1 𝑗 }, … , {(π‘₯1 𝑇1 , 𝑦1 𝑇1 ), 1}} and 𝑃2 = {{(π‘₯2 0, 𝑦2 0), 0}, … , {(π‘₯2 𝑗 , 𝑦2 𝑗 ), 𝜏2 𝑗 }, … , {(π‘₯2 𝑇2 , 𝑦2 𝑇2 ), 1}}, where 𝜏 𝑖 𝑗 = 𝑑 𝑖 π‘—βˆ’π‘‘ 𝑖 0 𝑑 𝑖 𝑇 𝑖 βˆ’π‘‘ 𝑖 0 2The trajectory is on a plane, but the extension to 3D spaces is straightforward. 19/6/2019 Sis 2019 7 / 47
  • 10. Euclidean distance between two trajectories i It is possible to express the two trajectories with a common set of πœβ€™s by a linear interpolation. Once the two trajectories are registered such that they have the same normalized 𝐿 ∈ [π‘šπ‘–π‘›(𝑇1, 𝑇2), (𝑇1 + 𝑇2)] time-stamps we compute the squared Euclidean distance between 𝑃1 and 𝑃2 as follows: 𝑑2 𝐸 (𝑃1, 𝑃2) = 1 ∫ 0 [(π‘₯1(𝜏) βˆ’ π‘₯2(𝜏)) 2 + (𝑦1(𝜏) βˆ’ 𝑦2(𝜏)) 2 ]π‘‘πœ = = 𝐿 βˆ‘ β„“=1 (πœβ„“ βˆ’ πœβ„“βˆ’1) { | Μ„π‘₯1(β„“) βˆ’ Μ„π‘₯2(β„“)| 2 + | ̄𝑦1(β„“) βˆ’ ̄𝑦2(β„“)| 2 + +1 3 [| Μ‡π‘₯1(β„“) βˆ’ Μ‡π‘₯2(β„“)| 2 + | ̇𝑦1(β„“) βˆ’ ̇𝑦2(β„“)| 2 ] } (1) where: 19/6/2019 Sis 2019 8 / 47
  • 11. Euclidean distance between two trajectories ii β€’ Μ„π‘₯1(β„“) = π‘₯1(πœβ„“)+π‘₯1(πœβ„“βˆ’1) 2 , Μ„π‘₯2(β„“) = π‘₯2(πœβ„“)+π‘₯2(πœβ„“βˆ’1) 2 , ̄𝑦1(β„“) = 𝑦1(πœβ„“)+𝑦1(πœβ„“βˆ’1) 2 , and ̄𝑦2(β„“) = 𝑦2(πœβ„“)+𝑦2(πœβ„“βˆ’1) 2 . The points ( Μ„π‘₯1(β„“), ̄𝑦1(β„“)) and ( Μ„π‘₯2(β„“), ̄𝑦2(β„“)) are, respectively, the centers of the segment that starts from (π‘₯1(πœβ„“βˆ’1), 𝑦1(πœβ„“βˆ’1)) and arrives at (π‘₯1(πœβ„“) , 𝑦1(πœβ„“)), respectively, the centers of the segment that starts from (π‘₯2(πœβ„“βˆ’1) , 𝑦2(πœβ„“βˆ’1)) and arrives at (π‘₯2(πœβ„“), 𝑦2(πœβ„“)); β€’ Μ‡π‘₯1(β„“) = π‘₯1(πœβ„“)βˆ’π‘₯1(πœβ„“βˆ’1) 2 , Μ‡π‘₯2(β„“) = π‘₯2(πœβ„“)βˆ’π‘₯2(πœβ„“βˆ’1) 2 , ̇𝑦1(β„“) = 𝑦1(πœβ„“)βˆ’π‘¦1(πœβ„“βˆ’1) 2 , and ̇𝑦2(β„“) = 𝑦2(πœβ„“)βˆ’π‘¦2(πœβ„“βˆ’1) 2 . The value ( Μ‡π‘₯1(β„“), ̇𝑦1(β„“)) and ( Μ‡π‘₯2(β„“) , ̇𝑦2(β„“)) are, respectively, the pairs of the signed component-wise half widths of the segment that starts from (π‘₯1(πœβ„“βˆ’1) , 𝑦1(πœβ„“βˆ’1)) and arrives at (π‘₯1(πœβ„“) , 𝑦1(πœβ„“)), respectively, of the segment that starts from (π‘₯2(πœβ„“βˆ’1) , 𝑦2(πœβ„“βˆ’1)) and arrives at (π‘₯2(πœβ„“) , 𝑦2(πœβ„“)). 19/6/2019 Sis 2019 9 / 47
  • 12. A k-means algorithm The (squared) Euclidean distance allows the FrΓ©chet means of a set of trajectories, thus a k-means algorithm can be applied. Can we compare different sub-trajectories? β€’ In several scenarios, if could be useful to consider how mobile-objects enter in place, how they exit and their intermediate paths. β€’ We propose to extend the k-means algorithm by considering a trajectory as a sequence of 𝑀 common (w.r.t. the normalized time) sub-trajectories which is a partition of the original one. β€’ While k-means of 𝑁 trajectories is like to do a k-means on one (functional) variable, k-means of 𝑁 trajectories on 𝑀 sub-trajectories is like to do a k-means on 𝑀 (functional) variables. – If the 𝑀 sub-trajectories have the same time-length, k-means of trajectories and on sub-trajectories return the same results! So, whats’ new! 19/6/2019 Sis 2019 10 / 47
  • 13. Using adaptive distances The hypothesis is that each sub-trajectory could have a different importance in the clustering process. Adaptive distances (or weighted distances)[3] β€’ We can consider a system of weights for each sub-trajectory reflecting the importance in the clustering process. β€’ Using adaptive distances in a k-means algorithm as suggested in [3], we extended the k-means algorithm for trajectories such that a system of weights is the solution of the minimization of the criterion function (or the cost function) of the k-means algorithm. β€’ We propose a global weighting system (a weight for each sub-trajectory) and a cluster-wise (a weight for each cluster) one. Note that, weights are computed by the algorithm and not provided by the user. 19/6/2019 Sis 2019 11 / 47
  • 14. The optimized criteria Method Criterion K-means π‘Š πΎπ‘š = 𝐾 βˆ‘ π‘˜=1 βˆ‘ π‘–βˆˆπ‘˜ 𝑑2 𝐸(𝑃𝑖, ̄𝑃 π‘˜) SK-means π‘Š π‘†πΎπ‘š = 𝐾 βˆ‘ π‘˜=1 𝑀 βˆ‘ π‘š=1 βˆ‘ π‘–βˆˆπ‘˜ 𝑑2 𝐸(𝑃𝑖,π‘š, ̄𝑃 π‘˜,π‘š) SKADAG (Glob. W.) π‘Š 𝐴𝐺 = 𝐾 βˆ‘ π‘˜=1 𝑀 βˆ‘ π‘š=1 βˆ‘ π‘–βˆˆπ‘˜ πœ† π‘š β‹… 𝑑2 𝐸(𝑃𝑖,π‘š, ̄𝑃 π‘˜,π‘š) s. a 𝑀 ∏ π‘š=1 πœ† π‘š = 1 SKADAL (Cl.-wise W.) π‘Š 𝐴𝐿 𝐾 βˆ‘ π‘˜=1 𝑀 βˆ‘ π‘š=1 βˆ‘ π‘–βˆˆπ‘˜ πœ† π‘˜,π‘š β‹… 𝑑2 𝐸(𝑃𝑖,π‘š, ̄𝑃 π‘˜,π‘š) s. a 𝑀 ∏ π‘š=1 πœ† π‘˜,π‘š = 1 βˆ€π‘˜ ∈ 1, … , 𝐾 19/6/2019 Sis 2019 12 / 47
  • 15. The algorithm: Initialization 0. Input: A dataset 𝑃 of normalized and registered trajectories cut at some predefined 𝑀 normalized time-stamps. A predefined 𝐾 number of clusters. 1. Initialization Set 𝑑 = 0 1.1 Centers selection Select randomly 𝐾 trajectories and store them in 𝐺(0) 1.2 Fix initial weights Fix Ξ›(0) = 1 1.3 Assign Assign data to clusters according to a minimum distance criterion, and generate the initial partition of trajectories 𝒫(0) 1.4 Compute initial criterion Compute π‘Š (0) 𝐴𝐺 (SKADAG) or π‘Š (0) 𝐴𝐿 (SKADAL) 19/6/2019 Sis 2019 13 / 47
  • 16. The algorithm: Iterative optimization 2. Repeat Set 𝑑 = 𝑑 + 1 2.1 Centers selection Fixed 𝒫(π‘‘βˆ’1) and Ξ›(π‘‘βˆ’1), compute the average trajectories for each cluster and store them in 𝐺(𝑑) 2.2 Compute weights Fixed 𝒫(π‘‘βˆ’1) and 𝐺(𝑑), compute Ξ›(𝑑) according to the constrained minimization of π‘Š (𝑑) 𝐴𝐺 (SKADAG) or π‘Š (𝑑) 𝐴𝐿 (SKADAL), using the Lagrange multiplier method. 2.3 Assign Fixed 𝐺(𝑑) and Ξ›(𝑑), assign trajectories to clusters according a minimum distance criterion w.r.t. the average trajectories, and store the partition of trajectories in 𝒫(𝑑). 2.4 Compute the new criterion Compute π‘Š (𝑑) 𝐴𝐺 (SKADAG) or π‘Š (𝑑) 𝐴𝐿 (SKADAL) . 2.5 Verify the stopping rule If π‘Š (𝑑) 𝐴𝐺 < π‘Š (π‘‘βˆ’1) 𝐴𝐺 (SKADAG) or π‘Š (𝑑) 𝐴𝐿 < π‘Š (𝑑) 𝐴𝐿 (SKADAL) then go to 2. else go to 3.. 3. Return solution Return 𝒫(𝑑), 𝐺(𝑑), Ξ›(𝑑). 19/6/2019 Sis 2019 14 / 47
  • 18. Two datasets We apply the algorithm to two datasets3 CROSS (road) dataset CROSS is a dataset of 1, 900 trajectories of vehicles approaching to a crossroad. The trajectories are labeled into 19 different types. LABOMNI It is a dataset describing 15 (𝐾) sets of trajectories of 209 people in a laboratory. 3available from http://cvrr.ucsd.edu/LISA/Datasets/TrajectoryClustering/CVRR_d ataset_trajectory_clustering.zip 19/6/2019 Sis 2019 15 / 47
  • 19. Main results: external validity indices Table 2: CROSS and LABOMNI datasets: ARI= Adjusted Rand Index, PUR=Purity, NMI=Normalized Mutual Information CROSS LABOMNI N=1,900 k=19 N=209 K=15 Methods ARI PUR NMI ARI PUR NMI K-means 0.8163 0.8389 0.9405 0.6715 0.8373 0.8248 cuts (0.15,0.85) cuts (0.005, 0.15,0.85,0.995) K-means pieces 0.8210 0.8411 0.9443 0.8772 0.9234 0.9118 SKADAG 0.8192 0.8400 0.9426 0.8930 0.9330 0.9230 SKADAL 0.8200 0.8405 0.9433 0.8273 0.9139 0.8998 Note: algorithms based on sub-trajectories perform slightly better for CROSS and significantly better for the LABOMNI. According to [7], we note that CROSS has less complex trajectories than LABOMNI. Indeed, CROSS contains more regular trajectories, since they show cars behaviors at a crossroad, while LABOMNI consists in trajectories of people that walk almost freely in a laboratory. 19/6/2019 Sis 2019 16 / 47
  • 20. LABOMNI clustering results i In the following slides, we focus on LABOMNI dataset. β€’ For each ground-truth class (top-left), we show the closest cluster (bottom-left). β€’ On the right, it is reported the respective Variance function, namely 𝑉 π‘Žπ‘Ÿ π‘˜(𝑝) = 1 𝑁 π‘˜ βˆ‘ π‘–βˆˆπΆ π‘˜ [𝑃𝑖(𝑝) βˆ’ ̄𝑃𝑖(𝑝)] 2 For comparing results, we plot the square root of the function. β€’ We report the log of relevance weights (that sum to zero because of the log transformation) 19/6/2019 Sis 2019 17 / 47
  • 21. SKADAG Traj 1 –> Old cla 1 (8) Newcla 13 (9) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.18 -0.63 -1.42 1.11 1.12 19/6/2019 Sis 2019 18 / 47
  • 22. SKADAG Traj 2 –> Old cla 2 (25) Newcla 15 (20) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.18 -0.63 -1.42 1.11 1.12 19/6/2019 Sis 2019 19 / 47
  • 23. SKADAG Traj 3 –> Old cla 3 (8) Newcla 4 (11) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.18 -0.63 -1.42 1.11 1.12 19/6/2019 Sis 2019 20 / 47
  • 24. SKADAG Traj 5 –> Old cla 5 (30) Newcla 9 (29) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.18 -0.63 -1.42 1.11 1.12 19/6/2019 Sis 2019 21 / 47
  • 25. SKADAG Traj 6 –> Old cla 6 (36) Newcla 2 (34) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.18 -0.63 -1.42 1.11 1.12 19/6/2019 Sis 2019 22 / 47
  • 26. SKADAG Traj 7 –> Old cla 7 (28) Newcla 5 (27) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.18 -0.63 -1.42 1.11 1.12 19/6/2019 Sis 2019 23 / 47
  • 27. SKADAG Traj 9 –> Old cla 9 (11) Newcla 7 (12) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.18 -0.63 -1.42 1.11 1.12 19/6/2019 Sis 2019 24 / 47
  • 28. SKADAG Traj 10 –> Old cla 10 (4) Newcla 10 (8) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.18 -0.63 -1.42 1.11 1.12 19/6/2019 Sis 2019 25 / 47
  • 29. SKADAG Traj 11 –> Old cla 11 (20) Newcla 6 (19) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.18 -0.63 -1.42 1.11 1.12 19/6/2019 Sis 2019 26 / 47
  • 30. SKADAG Traj 13 –> Old cla 13 (4) Newcla 10 (8) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.18 -0.63 -1.42 1.11 1.12 19/6/2019 Sis 2019 27 / 47
  • 31. SKADAG Traj 14 –> Old cla 14 (22) Newcla 3 (22) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.18 -0.63 -1.42 1.11 1.12 19/6/2019 Sis 2019 28 / 47
  • 32. SKADAG Traj 15 –> Old cla 15 (4) Newcla 12 (4) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.18 -0.63 -1.42 1.11 1.12 19/6/2019 Sis 2019 29 / 47
  • 33. SKADAL Algorithm Let’s see the SKADAL (cluster-wise adaptive distances) 19/6/2019 Sis 2019 30 / 47
  • 34. SKADAL Traj 1 –> Old cla 1 (8) Newcla 1 (11) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) 2.39 2.04 -1.84 -1.12 -1.47 19/6/2019 Sis 2019 31 / 47
  • 35. SKADAL Traj 2 –> Old cla 2 (25) Newcla 9 (20) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.01 -2.23 -0.51 1.45 1.30 19/6/2019 Sis 2019 32 / 47
  • 36. SKADAL Traj 3 –> Old cla 3 (8) Newcla 5 (11) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.26 -1.11 -2.29 2.05 1.60 19/6/2019 Sis 2019 33 / 47
  • 37. SKADAL Traj 5 –> Old cla 5 (30) Newcla 3 (25) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) 0.76 0.21 -1.93 0.58 0.38 19/6/2019 Sis 2019 34 / 47
  • 38. SKADAL Traj 6 –> Old cla 6 (36) Newcla 10 (12) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -3.30 -3.15 -1.60 3.70 4.36 19/6/2019 Sis 2019 35 / 47
  • 39. SKADAL Traj 6 –> Old cla 6 (36) Newcla 15 (31) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) 1.59 1.54 -1.88 -0.94 -0.32 19/6/2019 Sis 2019 36 / 47
  • 40. SKADAL Traj 7 –> Old cla 7 (28) Newcla 2 (22) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -1.57 -1.47 -1.41 2.20 2.25 19/6/2019 Sis 2019 37 / 47
  • 41. SKADAL Traj 7 –> Old cla 7 (28) Newcla 13 (12) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) 0.52 -1.20 -1.84 1.40 1.12 19/6/2019 Sis 2019 38 / 47
  • 42. SKADAL Traj 9 –> Old cla 9 (11) Newcla 2 (22) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -1.57 -1.47 -1.41 2.20 2.25 19/6/2019 Sis 2019 39 / 47
  • 43. SKADAL Traj 11 –> Old cla 11 (20) Newcla 6 (23) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) 2.99 3.47 -1.66 -2.37 -2.43 19/6/2019 Sis 2019 40 / 47
  • 44. SKADAL Traj 14 –> Old cla 14 (22) Newcla 7 (22) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -0.65 -0.64 -1.54 1.92 0.91 19/6/2019 Sis 2019 41 / 47
  • 45. SKADAL Traj 15 –> Old cla 15 (4) Newcla 8 (7) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 50 100 150 200 100 150 200 250 x y 0 20 40 60 0.00 0.25 0.50 0.75 1.00 p Vark(p) 0-0.005 0.005-0.15 0.15-0.85 0.85-0.995 0.995-1 log(𝑀) -2.11 -1.78 -0.30 2.22 1.96 19/6/2019 Sis 2019 42 / 47
  • 46. Comments on LABOMNI β€’ We see that some clusters are strange! This is due to misaligned trajectories. β€’ While alignment is solvable in a hierarchical clustering approach (for example, distances matrices can be computed using warping), in a k-mean approach is less feasible. 19/6/2019 Sis 2019 43 / 47
  • 47. Conclusions β€’ In this work – We presented a new k-means clustering algorithm for trajectories – We observed that using sub-trajectories improves clustering results β€’ In perspective – How many cuts and where to cut? – A possible solution is to cut everywhere! I.e., we are developing and testing a new algorithm where the πœ† are continuous. – Alignment of trajectories in a k-means framework. Recently, some proposal have been introduced for time-series. – Relaxing hypothesis without losing interpretability and performances. 19/6/2019 Sis 2019 44 / 47
  • 48. References i [1] DemΕ‘ar, U., Buchin, K., Cagnacci, F., Safi, K., Speckmann, B., Weghe, N.V., Weiskopf, D., Weibel, R.: Analysis and visualisation of movement: an interdisciplinary review. Movement ecology. 3:5, (2015) [2] Diday, E.: The dynamic clusters method in nonhierarchical clustering. International Journal of Computer and Information Sciences 2: 61 (1973) doi: 10.1007/BF00987153 [3] Diday, E. and Govaert, G.: Classification Automatique avec Distances Adaptatives. R.A.I.R.O. Informatique Computer Science, 11 (4), 329-349 (1977) 19/6/2019 Sis 2019 45 / 47
  • 49. References ii [4] Ferreira, N. , Klosowski, J. T., Scheidegger, C. E. and Silva, C. T.: Vector Field k‐Means: Clustering Trajectories by Fitting Multiple Vector Fields. Computer Graphics Forum, 32: 201-210. (2013) doi: 10.1111/cgf.12107 [5] Jiang Bian, Dayong Tian, Yuanyan Tang, Dacheng Tao. A review of moving object trajectory clustering algorithms. Artif Intell Rev (2016) doi: 10.1007/s10462-016-9477-7 [6] Lee, J., Han, J., Whang, K.: Trajectory clustering: a partition-and-group framework. Proceedings of the 2007 ACM SIGMOD international conference on Management of data, pp. 593-604 (2007) 19/6/2019 Sis 2019 46 / 47
  • 50. References iii [7] Morris, B. T., Trivedi, M. M.:Learning Trajectory Patterns by Clustering: Experimental Studies and Comparative Evaluation, in Proc. IEEE Inter. Conf. on Computer Vision and Pattern Recog., Maimi, Florida, (2009) [8] Sangalli, L.M., Secchi, P., Vantini, S., Vitelli, V.: K-mean alignment for curve clustering, Computational Statistics & Data Analysis, 54,5, 1219–1233 (2010) 19/6/2019 Sis 2019 47 / 47
  • 51. Thank you for your attention. Any questions?