6
Pattern Recognition Letters 13 (1992) 89-94 North-Holland February 1992 Clustering by discovery on maps Dario Maio DEIS-CiOC-CNR, Facolta di lngegneria, Universitd di Bologna, Viale Risorgimento 2, 40136 Bologna, Italy Stefano Rizzi Corso di Laurea in Scienze dell'informazione, Universitd di Bologna, Sede di Cesena, Via Sacchi 3, 47023 Cesena, ~,taly Received 6 August 1991 Abstract Maio, D. and S. Rizzi, Clustering by discovery on maps, Pattern Recognition Letters 13 (1992) 89-94. This paper describes an algorithm for clustering on-line learned maps, requiring no 'a priori' knowledge of the environment. It uses the nearest neighbour rule, coupled with a threshold mechanism. Experimental results are shown on real and fictitious maps. Keywords. Clustering, learning, maps, nearest neighbour classification. I. Introduction The problem of map representation plays a rele- vant role inside domains ranging from geographic information management to autonomous robot control. In order to supply an abstract description of the environment, or to decompose the manage- ment tasks, thus decreasing their complexity, it may often be useful to partition the map into clusters, associated with different semantic roles according to the environment scale: rooms for house-keeping robots, operative zones for in- dustrial robots, city districts for urban autonomous vehicles, regions or nations for territorial data- bases. In any case the final result of clustering should be entirely based on the topological features of the environment so that the clusters may be significant for the given application. This work has been partially supported by the Neural Nets Project of the Italian National Council of Research, and by PRO.COM Project of Prometheus. In this paper we will address the problem of clustering, assuming that distinctive places, which we will call labels, are present in the environment. For instance, within an urban environment labels might identify squares, monuments and other rele- vant buildings, whereas for a highway network a label might be assigned to each exit. In Kuipers and Byun (1988) a distinctive place is defined as the local maximum of some measure of distinctive- ness, and is identified by a hill-climbing search. The problem of clustering is generally faced on the basis of a description of the environment in its entirety, given 'a priori' to the system, or at least assuming some knowledge of the map borders. On these assumptions, clusters can be defined as the result of the optimisation of some given function (e.g., Rose (1990)). Optimal general solutions are often NP-hard (see Yao (1990)). Furthermore, even slight changes in the environment cause clusters to be rebuilt from scratch. Systems with no 'a priori' knowledge of the en- vironment are called explorers, which learn its map 0167-8655/92/$05.00 © 1992 -- Elsevier Science Publishers B.V. All rights reserved 89

Clustering by discovery on maps

Embed Size (px)

Citation preview

Page 1: Clustering by discovery on maps

Pattern Recognition Letters 13 (1992) 89-94 North-Holland

February 1992

Clustering by discovery on maps

D a r i o M a i o

DEIS-CiOC-CNR, Facolta di lngegneria, Universitd di Bologna, Viale Risorgimento 2, 40136 Bologna, Italy

S t e f a n o Rizzi

Corso di Laurea in Scienze dell'informazione, Universitd di Bologna, Sede di Cesena, Via Sacchi 3, 47023 Cesena, ~,taly

Received 6 August 1991

Abstract

Maio, D. and S. Rizzi, Clustering by discovery on maps, Pattern Recognition Letters 13 (1992) 89-94.

This paper describes an algorithm for clustering on-line learned maps, requiring no 'a priori' knowledge of the environment. It uses the nearest neighbour rule, coupled with a threshold mechanism. Experimental results are shown on real and fictitious maps.

Keywords. Clustering, learning, maps, nearest neighbour classification.

I. Introduction

The problem of map representation plays a rele- vant role inside domains ranging from geographic information management to autonomous robot control. In order to supply an abstract description of the environment, or to decompose the manage- ment tasks, thus decreasing their complexity, it may often be useful to partition the map into clusters, associated with different semantic roles according to the environment scale: rooms for house-keeping robots, operative zones for in- dustrial robots, city districts for urban autonomous vehicles, regions or nations for territorial data- bases. In any case the final result of clustering should be entirely based on the topological features of the environment so that the clusters may be significant for the given application.

This work has been partially supported by the Neural Nets Project of the Italian National Council of Research, and by PRO.COM Project of Prometheus.

In this paper we will address the problem of clustering, assuming that distinctive places, which we will call labels, are present in the environment. For instance, within an urban environment labels might identify squares, monuments and other rele- vant buildings, whereas for a highway network a label might be assigned to each exit. In Kuipers and Byun (1988) a distinctive place is defined as the local maximum of some measure of distinctive- ness, and is identified by a hill-climbing search.

The problem of clustering is generally faced on the basis of a description of the environment in its entirety, given 'a priori' to the system, or at least assuming some knowledge of the map borders. On these assumptions, clusters can be defined as the result of the optimisation of some given function (e.g., Rose (1990)). Optimal general solutions are often NP-hard (see Yao (1990)). Furthermore, even slight changes in the environment cause clusters to be rebuilt from scratch.

Systems with no 'a priori' knowledge of the en- vironment are called explorers, which learn its map

0167-8655/92/$05.00 © 1992 - - Elsevier Science Publishers B.V. All rights reserved 89

Page 2: Clustering by discovery on maps

Volume 13, Number 2 PATTERN RECOGNITION LETTERS February 1992

by means of sensors while moving in it (e.g., Rao (1989)), and clustering by discovery is defined as the procedure of partitioning the map at real-time during exploration. The concomitance of explora- tion and clustering is a mandatory feature for an autonomous system in which no artificial distinc- tion is made between the phases of learning and operating. We claim that a system must be able to make sound decisions by relying on the knowledge available at any one time.

The building of clusters is now viewed as an in- cremental process making use at each step of the results computed at the previous one. Of course, the late discovery of one or more routes inside or near an existing cluster would probably alter the optimal global arrangement of the clusters. At this initial stage of the research we do not allow for the rearranging of clusters at each exploration step. However, we will show that a nearly-optimal solu- tion can be achieved in most cases. Of course, we can imagine applying more sophisticated clustering algorithms on the learned map whenever the system is idle.

in this paper we propose an algorithm for clustering by discovery, based on a variant of the nearest neighbour rule. Each new route ex- perienced is compared by means of a proper dis- tance function to the existing clusters, and assigned to the 'nearest' of them. In order to trigger the creation of a new cluster, a threshold mechanism on the distance function is defined•

Section 2 outlines the basic assumptions on the environment. In Section 3 the map clustering prob- lem is formalised. An algorithm for clustering by discovery is presented in Section 4, and its per- formances are evaluated in a variety of cases.

together with symbolic components to equip a vehicle with a hybrid adaptive system which, while continuously interacting with an environment, im- proves its navigational skill through on-line learning.

We substitute each actual connection between labels with an abstract straight-line connection, called logical route or simply route. In Figure 1 examples of physical and logical routes in a household environment are shown.

On these assumptions, an environment can be represented by a map, including knowledge at two levels:

+ topology. The pattern of connections between labels is held in a non-directed graph whose ver- tices are labels and whose edges are logical routes.

• metric. Each logical route is tagged with its length and its direction, or equivalently, each label is tagged with its coordinates in a relative Cartesian system.

No explicit knowledge on physical routes is represented, but a cost parameter may be included for each logical route, taking into account, for in- stance, the average time required to undertake it, the possible presence of obstacles, and so on.

swi

telephone

stove

•m~mwml iIiiiIII q

2. Basic assumptions on the environment

Labels in the environment are variously con- nected by paths. At a symbolic level we are not concerned with the actual shapes of the paths connecting labels (physical routes): in fact, a real path includes bends and turn-offs, and would be better described at an analogic level by means of continuous measures. In Ciaccia (1991) we investi- gated the effectiveness of coupling a neural kernel

Figure 1. Fragment of a household map. A physical route (dot- ted lines) is the real path connecting two labels, whereas a logical route (plain line) is an abstract straight-line connection.

90

Page 3: Clustering by discovery on maps

Volume 13, Number 2 PATTERN RECOGNITION LETTERS February 1992

3. Exploration and clustering by discovery 2. border label:

Each exploration step may be described as:

I. explorer positioned in label L, 2. explorer moves along route ,o 3. explorer positioned in label L'.

R and L' may or may not have already been ex- perienced. We would emphasize that route R links labels L and L' by writing R(L,L') or R(L',L), assuming that each route is bidirectional.

Input data constitute a stream whose format is assumed to be:

• L' (label reached), • ! (length of R(L,L'), that is, straight-line

distance between L and L'), • a (orientation of R(L, L'), that is, angle formed

with a reference direction 9 ) .

In the following we will suppose that data ac- quired from the environment are geometrically consistent I .

We say that two routes R and S are connected if they share one end label, or if R shares one end label with a route T which is connected to S. Within a map learnt by exploration, every pair of routes must necessarily be interconnected. Thus, it is always possible to choose a label Lo arbitrarily as the origin of a Cartesian system with X axis directed along ~ , and tag each label Li with a pair of co- ordinates xt.i, YLa. This allows the euclidean distance e(Li, Lj) between labels Li and Lj to be calculated; the euclidean distance between two adjacent labels is the length of the route which links them.

Let ~ and ~¢ be, respectively, the sets of labels and routes of a map ,At' which are known at time t. A clustering on ~,a' at time t is defined by a parti- tioning {~i 1i= 1, . . . ,n} on ,~, where each ~ i is connected ~that is, every pair of routes within ~ i is connected). The partitioning on ~ induces a par- titioning {~i ,~ jk ! i , j , k=l , . . . ,n} on ~ , which can be described as follows:

1. internal label:

LEVi *~ R(L,x)e,~i VX,

L ~ ,~)t,. *~ 3R(L,x), S(L,y)

[R(L,x)e ~j,S(L,y)~ ~kl.

The map thus appears to be subdivided into clusters of routes and labels ~i=(~i,~i) and border sets ,~jk. This approach is oriented to solve shortest path problems by decomposing the search into restricted spaces resembling the disconnection set approach in Houtsma (1990), and is naturally extendible for implementation on parallel pro- cessors. We say that two clusters ~j and ~ . are adjacent if ~jk #:0, in which case every label in fCk can always be reached from every label in ~'j by passing through one or more border labels. In Figure 2 an example of clustering on a map is shown.

From a geometric point of view, clusters are complex irregular structures. In order to make their manipulation easier, we represent them with simpler structures, such as circles. The problem of circular and elliptical fit of objects in two dimen- sions is analysed in Chaudhuri (1990,1991), con- sidering simply-connected objects. Instead, in this context we deal with clusters of scattered points, and are concerned not only with their borders but also with their density.

Let ~i be a cluster including n; routes, and 2, be their average length. Let Pk be the mid-point of generic route R~. As shown in Figure 3, we characterize ~e i with an equivalent circle, centred in the barycentre c~ of the mid-points of the set of belonging routes, and with radius ri such that the circle contains n~ routes, each 2~ long, arranged in

I The problem of inconsistencies due to errors in measures has already been considered by the authors, and will be detailed in a forthcoming paper.

Figure 2. An example of clustering on a map. The border labels are hooped.

91

Page 4: Clustering by discovery on maps

Volume 13, Number 2 PATTERN RECOGNITION LETTERS February 1992

"w-y/ Figure 3. The equivalent circle of a cluster ~i-

a regular triangular network. Thus, the equivalent circle acts as a 'high-density' substitute for ~'i. From the given definition it follows that:

1 n, 1 n, Xci = - ~ Xp,, Yci = - ~ yp, , (1)

ni k=l ni k=!

3 area of equivalent circle ni = 2 area of a triangular mesh

3 nr/2 = 2 (1/~/4)22 =' ri = kAi V~i (2)

where k=3-1/4(2n)-1/2=0.3031, ri is calculated leaving edge effects aside, and considering that every triangular mesh contributes to n~ with three sides, each shared with another mesh.

The radius grows with the number of routes and their average length, thus describing the 'exten- sion' of a cluster independently of its actual shape.

Clustering and exploration take place in parallel. Hence, each new route R undertaken must either be classified into one of the existing clusters, or form a new one. Since we make no restrictive hypotheses about exploration strategies, we should also consider the possibility of discovering labels and routes within the same neighbourhood subse- quently. Nevertheless, in the following we will assume the insertion of a new route to be the only operation admitted on clusters. The splitting, join- ing or rearranging of existing clusters is not taken into consideration so as to avoid the update of the whole map at each insertion.

4. A nearest neighbour algorithm

Our approach to the problem of map clustering is based on a variant of the nearest neighbour rule

(NNR). Let a function distance t~ be defined, so that ~(R(L,L'), ~'i) is the distance between the route R(L,L') to be classified and the generic cluster ~i. R(L, L') is assigned to the cluster ~'* such that

t~(R(L,L'), C*)

= min{b(R(L,L'), ~i) I i= l, ...,N},

where N is the number of clusters already created.

Since, when exploration begins, we do not have

any knowledge of the number and position of

clusters, we must supply a mechanism to create a

new cluster whenever a route cannot be satisfac-

torily assigned to any of the existing ones. This

goal is achieved by defining a threshold distance td such that if t~(R(L, L'), ~'*) is greater than td, then a new cluster is created to contain R(L,L').

Actually, the connectivity constraint imposed on

each cluster reduces the search space. In fact, when

the starting label L is internal to some ~'i, we have

only to decide whether to assign R(L, L') to ~'i or create a new cluster. On the other hand, if L is a

border label for clusters { ~il, ~i2, ..., ~'i,,, [m<.n}, then R(L, L') may be assigned either to one of these or to a new one.

The form to be adopted for function b is deter-

mined by the clustering criterion chosen. We

associate each cluster ~'; with a scattering measure s~, defined as follows:

~," e(c.Pk):lk k=l S i = • ( 3 )

ri

It must be noted that the numerator is the mo- ment o f inertia about the axis orthogonal to the plane of the map in ci, of a set of ni points, each having mass It,. (length of route Rk) and placed at the mid-point of route Pk. To give a measure of fitness we compare the moment of inertia to the radius ri of the equivalent circle.

When a new route R, with length 1 and mid- point p, is added to the map, it is straightforward to prove that the increase of total scattering, caus- ed by the inclusion of R is a candidate ~'i, is

e(ci, p)21 As = , (4)

ri

assuming that the displacement of ci and the variation of ri can be ignored (it can be proved

92

Page 5: Clustering by discovery on maps

Volume 13, Number 2 PATTERN RECOGNITION LETTERS February 1992

-.. , .

" . : . .

f s i ' " " " '

, ,, \ ..........

• . . . . ........ -----,'-,,, ,,," ~ . . ' " : ' . . . . . .-.. . .": ~ , ~ " ~ " - ~ ,~ ,~J • • . . . . " " , . . . •

, . . - ¢ - . . . / ~ " . " .¢

,...: ........... _._-.;:-: .... ~ I-~,- ~ , --.< ,, i ..,..- / /'x>-.; . . . . . ,, ,

....-.'~:"-...

".

• • :i ::. i i . . ~" ....................................... 2~: ....... ~ : ..- ..... " .... •

(a) (b)

Figure 4. Clusterings on an urban map, using different exploration strategies and the same threshold (td= 1.45 x 106). Border labels

are hooped. (a) moves in a spiral from the surroundings towards the centre of the map; (b) routes are chosen on the basis of a random criterion.

that the relative variation of r i is negligible if hi>> l /g~) . Hence, if we choose function 6 as:

e(ci ,p)21 ~(R, ~i) = , (5)

ri

the use of NNR minimises/Is at eact: step. In order to frame the threshold mechanism

within this perspective it should be noted that, were R included iil a new cluster ~, the increase in total scattering would be equal to the scattering of ~. Since the scattering of a one-route cluster is zero (the centre of the cluster falls on the mid-point of the route), As would appear to be minimised at each step by creating a new cluster. Thus, the scat- tering of a one-route cluster must be given a con- ventional non-zero value, which is the threshold distance td .

The clustering algorithm has been tested on a sample of maps, including some fictitious regular maps and a real urban map. The choice of an ur- ban map allows the results obtained to be com- pared with the city districts which a human would identify at first sight.

A significant aspect of the proof concerns repeated exploration of the same map adopting different strategies, that is, visititig labels in a dif- ferent order. This allows estimation of the robust- ness of the algorithm in terms of independence from the sequence of routes undertaken..Some results are shown in Figure 4, referring to a real

urban map where a significant set of distinctive places has been labelled. Two exploration strategies are shown, the first moving in a spiral from the surroundings towards the centre of the map, the second choosing routes on the basis of a random criterion. The same threshold was used in both cases. It should be noted that the clusterings ob- tained are plausible and ,comparable in terms of the number and shape of clusters.

The definition of a threshold distance allows for the grain of clustering to be tuned. In fact, the higher td, the lower the probability of creating a new cluster, hence, the coarser the grain of

° ..... LF ,. IIIIF.:.::.-... ........

..' :' ',,

..... :" "', ....... : ' .... , ......

, ...... ) ........................................ :;...

• • . ~ - ........... ,,. .................. ~ ...... ,

• • . . . . . . . . . . . . . . . . : . . ' " , i

• . ' . . : . . / , " - , , . . . '..,,." ~

" ' , , • ' & . ' ~ . " " ~ . . . . . . . ,'" , . ! . . . . . . . • . ' . . . • ~..,P. : . . . . . ~...~ -¢ , -

" / ~ - - . t 't t

• " ; - . . ", '1- . . . . . . .,, I i • I / ' , - -I /'IP'. ".'2 /" " " - " . f

Figure 5. Clusters obtained using the same spiral strategy as in

Figure 4a, but with a different threshold (td= 1.40x 106).

93

Page 6: Clustering by discovery on maps

Volume 13, Number 2 PATTERN RECOGNITION LETTERS February 1992

clustering. An exact relationship between td and the average number of routes per cluster cannot be established, since this number, given a fixed td, heavily depends on the particular arrangement of routes within each cluster. Figure 5 shows how the choice of a different threshold value modifies the results of clustering.

5. Conclusion

In this paper we have shown a successful and robust clustering algorithm for maps which are to be learned on-line. The major achievement of our approach is that no 'a priori' knowledge on the en- vironment is required. Key development tasks which are currently being investigated are listed below.

So

s/= + r:

e(c~,p)21ri I '

ri ri

ri

r: (,[in; + l ) / l ~ i + 1

i/1 + l /n; 1 = : 1 when ni>>--.

1 + 1/gin; gi

Thus e(ci,p)21

As = As; = s : - s ; =

on the assumption n;~> 1~hi.

References

• Analysis of an adaptive clustering algorithm taking into account the possibility of rearrang- ing the existing clusters at each insertion in order to obtain an optimal solution and describe an environment subject to changes;

• Integration of clustering and error correction methods;

• Representation of complex maps by means of hierarchies.

Derivation of formula (4)

~-~'.~l e(c.Pk)21k $i = ra

where r i = kAi ]/r~. Af ter the insertion of route R, if we assume c:=ci , we get

~," e(c;,Pk)21k +e(c ,p)21 k=l s : =

r: where

r: = + 1 = k l + 1 n;+ 1

Chaudhuri, B.B. (1990). Optimal circular fit to objects in two and three dimensions. Pattern Recognition Letters l l, 571-574.

Chaudhuri, B.B. and G.P. Samanta (1991). Elliptical fit of ob- jects in two and three dimensions by moment of inertia op- timization. Pattern Recognition Letters 12, I-7.

Ciaccia, P., D. Maio and S. Rizzi (1991). Integrating knowledge-based systems and neural networks for naviga- tional tasks. Proceedings of IEEE Compeuro. Computer Society Press, 652-656.

Houtsma, M.A.W., P.M.G. Apers and S. Ceri (1990). Complex transitive closure queries on a fragmented graph. In: S, Abiteboul and P.C. Kanellakis, Eds., Proceedings of lCDT 90, Paris, France. Lecture Notes in Computer Science 470. Springer, Berlin, 470-484.

Kuipers, B.J. and Y.T. Byun (1988). A robust, qualitative method for robot spatial learning. Proceedings of AAAI88, Saint Paul, MN, 2, 774-779.

Rao, N.S.V. (1989). Algorithmic framework for learned robot navigation in unknown terrains. IEEE Computer, June 1989, 37-43.

Rose, K., E. Gurewitz and G. Fox (1990). A deterministic an- nealing approach to clustering. Pattern Recognition Letters ! I, 589-594.

Yao, F.F. (1990). Computational geometry. In: J. Van Leeuwen, Ed., Handbook of Theoretical Computer Science. Elsevier, Amsterdam, 345-389.

94