Information Technology Reference
In-Depth Information
The only parameter to be adjusted on this stage is
τ
defined as:
min
j
s
j
)
d
((
x
i
,y
i
)
,
.
τ
=max
i
(1)
where
d
((
x
i
,y
i
)
,
s
j
) is the distance between point (
x
i
,y
i
) of the original
trajectory and the segment
s
j
of the linearized trajectory.
2.2 Growing Neural Gas
Once we have extracted all the segments from the observed set of trajectories,
the GNG algorithm is used to find clusters of sub-trajectories. The data used
in the training process is the whole set of segments, from all the trajectories,
found in the previous stage. This training set is defined as
S
{
s
1
,
s
2
, ...
s
m
}
,
where
m
is the total number of segments. It is important to highlight that, in
order to find the clusters, the information about what trajectory is producing
the segment
s
i
is not present. The procedure can be summarized in the following
steps:
=
1. Define a maximum number of iterations,
mxiter
,amaximumnumberof
nodes
mxnodes
, the actual number of nodes
n
= 0, a matrix of weights
Ω
∅
, a vector of errors, E = 0, a matrix of connections, C = 0, and set
the actual iteration
iter
=1.
2. Randomly select two segments from the training set, (
=
s
a
,
s
b
) and assign them
as the weights of the two first nodes:
ω
1
←
s
a
ω
2
←
s
b
Ω
.
(2)
=
{
ω
1
,
ω
2
}
Set a connection
C
(1
,
2) =
C
(2
,
1) = 1 and make
n
=2.
3. Randomly select a segment,
s
i
from the training set and search the near-
est weight,
ω
s
. Connect nodes
f
and
s
,
C
(
f, s
)=
C
(
s, f
) = 1. Increment the error associated to node
f
by:
ω
f
and the second one
2
E
f
=
E
f
+
s
i
−
ω
f
(3)
Update the reference vectors of the winner and its direct topological neigh-
bors by fractions
ε
a
and
ε
n
, respectively, of the total distance to the input
vector:
Δ
ω
f
=
ε
a
(
s
i
−
ω
f
);
Δ
ω
j
=
ε
b
(
s
i
−
ω
j
)
j
∈
N
f
(4)
N
f
is the set of direct topological neighbors of node
f
.
4. Increment the connection value of all neighbors of
f
,
C
(
f, j
)=
C
(
f, j
)+
1
,C
(
j, f
)=
C
(
j, f
) + 1. Remove all the connections,
C
(
f, h
)=
C
(
h, f
)=0,
greater than a predefined value
α
. If in this step a node is found to be isolated,
it is removed from all associated vectors and matrices and the number of
active nodes is decreased. Increment the value of
iter
.
where
Search WWH ::
Custom Search