<<

1 Random Sets and Histograms Javier Nu˜nez-Garcia and Olaf Wolkenhauer UMIST Control Systems Centre, UMIST, P.O. Box 88, M60 1QD, Manchester, UK e-mail: [email protected], [email protected] phone: +44 (0)161 200 4672, fax: +44 (0)161 200 4647 http://www.umist.ac.uk/csc/

Abstract outcomes of a random set and Rd containing the point- outcomes for a . One of the first deep A probability density function verifies more de- studies about random sets based on topological spaces manding properties than a possibility measure. can be found in [9] and posterior developments such as Probabilistic models ensure a predictable asymp- convergence theorems in [10]. Some other authors have totic behaviour. This should not be taken to sug- used random set theory as a base to create possibility gest possibility theory should not be used. In measures and fuzzy sets models [6], [16], [17]. In these fact, a histogram is a possibility measure and it references the authors set up membership functions by is generally a better descriptor of a small sam- using random sets. In [16], they apply this concept to ple of than a probability density function knowledge acquisition. Another field in which random regardless of its asymptotic properties. A possi- sets have become an useful tool is image processing [14], bility measure or also called fuzzy restriction is [13], [15], [3]. In the first section we briefly review some also more flexible or adaptable to different prac- definitions related to random sets. tical problems whereas probability theory try to In this paper we introduce the idea that a histogram generalize optimal methods applied to many dif- constructed from a sample of data is the single point ferent stochastic processes. Some people have coverage function of a determined random set. The his- already exploited the connection between proba- togram is a very common tool to visually summarise the bility theory and possibility theory or fuzzy sets distribution of a sample of data. Most of the proba- to set up membership functions and to create bilistic models built for stochastic point processes are fuzzy sets models. In this paper, we show that based on probability density functions estimated from a histogram is the coverage function of a deter- histograms by its normalisation to integrate to one. mined random set. This suggests other methods Both, histograms and density functions, have the objec- to create more accurate or different featured his- tive to resume the frequencies of observations. How to tograms by using random set theory. One ex- build a histogram is then an important issue to take into ample of a histogram with overlapping classes is consideration. The shape of a histogram depends princi- provided. pally on the mesh dividing the space into classes or bins Keywords: histogram, random sets, coverage which depends on the purpose for which the histogram function, possibility measure. is built. For example, different classes are necessary for I. Introduction a simple presentation of the data or for an estimator of a probability density function [18]. The definition of a random set does not differ much Although probabilistic models provide very interest- from that of a random variable. While random variables ing theoretical properties such as predictable asymptotic deal with stochastic point processes, random sets deal behaviour, often it is preferable to work with a simple with stochastic set processes, i.e., those with a set of el- and accurate histogram which is more manageable. The ements as the possible outcomes. Certainly, both have a idea that a histogram is the single point coverage of a common definition if the set-outcomes are seen as single determined random set, opens the door to a wide elements of an appropriate space of discourse. Further to of techniques used in random sets, fuzzy sets and pos- this analogy, it is hard to find a parallel way to develop sibility theories for the study of point processes as an random set theory as there exits for random variables alternative to probability theory. since a space formed by families of sets is more compli- In the last section, an example of a histogram gener- cated than a space formed by single points. For example, ated from a random set is shown. The most peculiar fea- the space power set of Rd, P(Rd) containing the set- ture of the proposed histogram is the use of overlapped classes generated by using some statistical properties of from which the following estimator of the coverage func- clusters in data. tion (2) is calculated II. Random Sets and Coverage Functions n 1 d cˆ(x)= IX (x), ∀x ∈ R (4) n i Although the following result can be generalised to a i=1 range of topological spaces, we assume that Rd is the space of the discourse. A random set X is a random ele- for a sample of random sets X1,X2, ..., Xn given. From ment belonging to a family F of subsets of Rd. Suppose (2), we can define a possibility distribution for subsets d an with possible outcomes belonging to F. of R : C A c x ∀A ⊆ Rd The definition of a random set follows the same philoso- X ( )=sup X ( ) (5) x∈A phy that for a random variable, which formal definition d is a (σΩ −σRd )-measurable mapping x :Ω→ R .Where and its estimator (Ω,σΩ,PΩ) is a probability space which is the mathe- d d Cˆ(A)=sup cˆ(x) ∀A ⊆ R . (6) matical description of the experiment and (R ,σRd )isa x∈A measurable space. The distribution or probability law −1 c · of a random variable is defined by Px = PΩ ◦ x .A In [16], the authors prove that ˆ( ) is unbiased and con- random variable is used to move the mathematical de- sistent and they give several limit theorems justifying scription of an experiment from its original probability the use of (4) as an estimator for the single point cov- space into a well known measurable space. One of the erage function (2) of the random set X. They also give most commonly used σ-algebra of Rd is the Borel alge- some results regarding its properties and they revise the bra. Very often it occurs that the outcomes of the ex- particular case where the random subsets are intervals of periment are real numbers and the measurable mapping R. The study of the extreme points of the random inter- is then the identity since both measurable spaces are the vals, which are their self random variables, is equivalent same. A random set X is a random variable which maps to study the distribution of the random intervals. This the elements of the original probability space into ele- idea is also mentioned and discussed in [15]. A random ments of (F,σF ), where σF is an appropriate σ-algebra set whose location and shape depends on several param- ensuring that the random set is measurable. Thus the eters or random variables, is suitably modeled by probability space (F,σF ,PX ) is a probabilistic model of of the distributions of these random variables. X P . Note that the probability measure X has to deal III. Histograms: a Particular Case of σ with families of subsets belonging to F , i.e. Coverage Function −1 PX (A)=PΩ ◦ X (A)=PΩ{ω : X(ω) ∈A} ∀A∈σF A histogram summarizes graphically the distribution of a set of data. Among other things a histogram shows This is rather complicated to use. In [9], Matheron intro- and variability, outliers, , etc. duced the Choquet capacity functional [2] of a random A histogram is obtained by splitting the range of the set and proved that it determines the probability dis- data into classes or categories. The number of data tribution of the random set. The capacity functional is points from the data sample that fall into each class are defined for sets (instead for families of sets). This makes counted. The histogram is the of the classes against its use more convenient than the distribution of the ran- the counts. Fig. 1-top is the histogram of a first order au- dom set itself. Posterior developed random set theories toregressive process with square classes. Fig. 1-bottom and applications, are based on capacity functionals (for is the contour plot with the sample of data. The shape of example in [10], [12]). the histogram is strongly dependent on the choice of the The single point coverage function of a random set X classes. Two histograms with different binwidth param- is defined as a function c : Rd → [0, 1] such that X eter may provide different visualisation of the sample of c x P x ∈ X , ∀x ∈ Rd. data. A number of theoretically derived rules to con- X ( )= X ( ) (2) struct the classes have been proposed in [18]. Without Def. (2) defines a fuzzy restriction and is also called a lost of generality let us suppose that the universe of dis- possibility measure [7]. Note that the coverage function course is R and a histogram f : R −→ R for a sample is equal to the expectation of the indicator function of of data x1,x2, ..., xn is given. First we define the family X ,X , ..., X R X, i.e. cX (x)=E[IX (x)]. The indicator function is of subsets 1 2 n of formed with elements of defined as the set of classes {I1,I2, ..., Id} of closed intervals used to build the histogram. Xi = Ij ⇐⇒ xi ∈ Ij , ∀i = 1,x∈ X , ..., n, ∀j , ..., d IX (x)= 1 =1 . The sample of sets, thus gener- 0,xotherwise ated, contains every Ij repeated as the number of data 1 2

c( ) 1.5 1 2 0.5 1 0

y(k) y(k+1) 0 -0.5 -1 -1 -1.5

-2 -2 -1 0 1 2 20 40 60 80 100 120 140 k y(k) 2 Fig. 2. First-order nonlinear autogregressive process.

1 function. Random set theory could then provide a wide range of coverage functions to be used as histograms or even as multivariate forecasting function in the same way

0 as marginal multivariate density functions are used [4]. y(k+1) IV. An Example of Coverage Function for Forecasting -1 The process that generates the sample of data used in the example is from the book [1] and has been used in

-2 the paper [19]. The model was first described by Ikoma -2 -1 0 1 2 and Hirota in 1993. It consists of a nonlinear AR(1) y(k) dynamic system simulated by the function: Fig. 1. Histogram of an AR(1) process with square classes (left) y(k +1)=f y(k) + (k), and its contour plot with the sample of data (right).  2t − 2, 0.5 ≤ t, f(t)= −2t, −0.5

T −1 Xi = {z ∈ Ξ:(z − ci) Su (z − ci) ≤ ai} -2 i -2 -1 0 1 2 Fig. 3-top, shows the sample of random sets or ellipses y(k) and the sample of data training. Note how the sample of 2 random sets overlapped opposite to the commonly used histogram where the classes are a hard partition of the space. In Fig. 3-bottom the estimator of the single point 1 coverage function, calculated by (4), is plotted. If the actual time is ko and the response of the system at this 0 time is y(ko), it is possible to make a forecast by using y(k+1) the marginal coverage function which is a function such c R → , that X : [0 1] defined by y(ko ) -1 c y c y,y k T ∀y ∈ R X ( )= X ([ ( o)] ) y(ko ) Note that this holds independently of the dimension of -2 -2 -1 0 1 2 the state space. The estimator of this marginal coverage y(k) function is given by Fig. 3. Histogram with elliptical overlapped classes (left) and its c y c y,y k T contour plot with the training data (right). ˆy(ko)( )=ˆ([ ( o)] )= n 1 T = IX ([y,y(ko)] ) ∀y ∈ R (10) n i gravity method” (COG) frequently employed in fuzzy i=1 control [7] : and the marginal possibility distribution for subsets of y · c y y R ˆy(ko)( )d Y C A c y ∀A ⊆ R. y ko . y(ko)( )=sup ˆy(ko)( ) ˆ( +1)= (12) y∈A c y y ˆy(ko)( )d We predict the response of the system at the time Y k c · o + 1 by investigating the distribution y(ko)( )which In Fig. 4 the dashed lines are the forecast for ko +1 = represents the uncertainty of the model based on the 90 by using COG and the continue lines are the real data training data. It reflects the confidence of the outputs points. Another way to obtain a single output value is more accurately and may in fact be more informative or to choose the most possible point in the output space precise than a single number. Note that the marginal given a input data, i.e., the point in R that maximizes coverage may have different shape for different input the marginal possibility measure (10) which is data. Opposed to common model identification tech- y k y ∈ R c y C R . niques, such as regression, were the marginal functions ˆ( o +1)= :ˆy(ko)( )= y(ko)( ) (13) only differ in the location. Their is on the model and all have the same spread or skewness, due to the as- If the maximum is achieved for all the points of an in- sumptions that hold about the distribution of the resid- terval of R, the mean of that is used as the pre- uals. Note in Fig. 4, the very different shape of the dictor. Fig. 5 resumes the differences between a classical marginal function for a squared histogram (left) and for squared histogram (left) and the proposed histogram in a elliptical one (right) for the same ko = 89. However, if this paper (right). The thicker line associated to the left a single-valued forecast is required we can use the stan- side of the frame, represents the number of data valida- dard way to “defuzzify” a distribution, called “centre of tion with null marginal distribution. For these data, the 2 0.5 17 15 0.4 13 11 0.3 9 c(y) MSE 0.2 7 5

0.1 3 Data No Covered 0.05 1 0 0 0.25 0.5 0.75 1 1.25 45 40 35 30 25 20 15 10 5 Number of Bins 1 0.2 4 0.8

0.15 3 c(y) 0.4 0.1 2 MSE

0.2 0.05 1 Data No Covered 0 0.25 0.5 0.75 1 1.25 0 3 5 7 10 12 15 17 20 Fig. 4. Marginal coverage functions at ko =89(y(89) = −0.69) Number of Neighbours for squared histogram (left) and elliptical histogram (right). The dash line is the forecast for ko + 1 = 90, by using the Fig. 5. MSE and data validation no forecasted for both his- centre of gravity and the continuous line is the real value. tograms.

the space; a cuboid needs d×2d−1 inequations. However histograms are unable to provide a forecast. Note that when the histogram forms the basis for density function all the data training have not null marginal distributions. estimation, the calculation of the integral for the inter- The gray and black lines, associated to the right side of section of some ellipses is rather complicated than for the frame, are the mean squared error of the forecasts non-overlapping regular polygons such as squares, trian- for the data training and data validation respectively by gles, etc... using the centre of gravity. Note that the data valida- tion without forecast is not included in the MSE. For the V. Conclusion “square histogram”, the horizontal axis is the number of classes in which the interval [−2, 2] has been divided. Classical histograms based on non-overlapping classes For example, 20 means that the binwidth of the classes are ideal to estimate probability density functions since used to build the histogram is (2 + (−2))/20 = 0.25. the integral of these polygons is not complicated to cal- Note when the number of classes increases, the binwidth culate. When the aim is other than to build probabilistic decreases. For the ellipsoidal histogram, the horizontal models, for example, to forecast through possibility mea- axis represents the number of nearest neighbours used to sures, other histograms as the one presented are a better build the ellipses. There exist a clear difference between alternative. The principal idea we exposed in this paper both histograms. The “square histogram” has a higher is that a histogram is the single point coverage function MSE for the data validation and it is more sensitive than of a determined random set. The construction of a his- the elliptical histogram to the size of the classes. Small togram carries implicitly within itself, the generation of a changes in the binwidth imply a large variation in the sample of random sets. Consequently, many random set MSE and the number of missing forecasts. The explana- concepts that are applied to set processes, can also be ap- tion of this effect is that for the ellipsoid model the uncer- plied to point processes. For example, we can select the tainty of the system more accurately than the squares. adequate classes to construct a histogram depending on Note that the location and shape of the squares does the distribution of the sample of data. To adjust the size not depend directly on the data as opposed to the el- of the classes we can use the expectation of the distance lipses. Another advantage of this histogram is the easier between a future response and the actual sample of ran- way it can be computed. While a hyperellisoid needs dom sets [11], thus we could ensure that our histogram only one inequation, independent of the dimension of will be able to forecast next step. We can measure the distance between two coverage functions [14], [3] of the same process at different times, in order to understand its evolution, convergence and stability. Future research on the feasibility of applying random set theory to point processes analysis will be carry out. Acknowledgments This research has been supported by the UK Engineer- ing and Physical Sciences Research Council (EPSRC) under Grant GR/L95151. References [1] R. Babuska. Fuzzy Modelling for Control. Kluwer, 1998. [2] G. Choquet. A theory of capacities. Ann, Inst. Fourier, pages 131–295, 1954. [3] M. Friel and I.S. Molchanov. Distances between grey-scale images. Mathematical Morphology and its Applications to Image and Sigal Processing, pages 283–290, 1998. [4] C. A. Glasbey. Non-linear autoregressive with mul- tivariate gaussian mixtures as marginal distributions. Applied , pages 143–154, 2000. [5] I.R. Goodman. Fuzzy sets as equivalence classes of random sets. Fuzzy Set and Possibility Theory, pages 327–243, 1982. Pergamon Press. [6] I.R. Goodman et al. Mathematics of Data Fusion.Kluwer Academic Publishers, 1997. [7] R. Kruse et al. Foundations of Fuzzy Systems. John Wiley, 1994. [8] Q.D. Li. The random set and the cutting of random fuzzy sets. Fuzzy Sets and Systems, 86:223–234, 1997. Elsevier Science. [9] G. Matheron. Random Sets and Integral Geometry. Wiley, New York, 1975. [10] I.S. Molchanov. Limit Theorems for Union of Random Closed Sets. Lecture Notes in Mathematics. Springer-Verlag, 1993. [11] I.S. Molchanov. Statistical problems for random sets. in: Ran- dom sets: Theory and applications. The IMA Volumes in Mathematics and its Applications, 97:27–46, 1997. [12] I.S. Molchanov. Statistics of the Boolean Model for Practi- tioners and Mathematicians. Wiley Series in Probability and Statistics. John Wiley & Sons, 1997. [13] I.S. Molchanov. Averaging of random sets and binary images. CWI Quarterly, 11:371–384, 1998. [14] I.S. Molchanov. Grey-scale images and random sets. Mathe- matical Morphology and its Applications to Image and Sigal Processing, pages 247–258, 1998. [15] I.S. Molchanov. Random Sets in View of Image Filtering Ap- plications. In: Nonlinear Filters for Image Processins. 1999. [16] T. Peng, P. Wang, and A. Kandel. Knowledge acquisition by random sets. International Journal of Intelligent Systems, 11:113–147, 1997. John Wiley and Sons. [17] L. Sanchez. A random sets-based method for identifying fuzzy models. Fuzzy Sets and Systems, pages 343–354, 1998. Else- vier Science Publishers. [18] David W. Scott. Multivariate . Wiley Series in Probability and . John Wiley & Sons, 1992. [19] O. Wolkenhauer and M. Garcia-Sanz. A random sets statis- tical approach to system identification. In AIDA’99, pages 388–392, 1998.