Algorithm 2 Sound events clustering |
Require: sub_events D, , ,
Ensure: events E
-
1:
y = amplitude of a sub-event/event
-
2:
X ← first cluster to be grown, initialized with
-
3:
for each sub_event of D do
-
4:
if ( < ) & ( < ) then
-
5:
X ← X +
-
6:
y ← new weighted amplitude of X
-
7:
else
-
8:
insert into E as a new cluster to be grown
-
9:
end if
-
10:
end for
-
11:
for each pair (, ) in E do
-
12:
← event of (, ) with lowest score
-
13:
if ( < ) & ( < ) then
-
14:
Merge with , the new y being weighted with respect to events widths
-
15:
end if
-
16:
end for
|