Document not found! Please try again

Case-based querying and prediction - A fuzzy set ...

8 downloads 548 Views 669KB Size Report
the attribute domain of i (Si is supposed to be reflexive and symmetrical). ... is 'small' with a low price, and another which is 'large' but with a medium price, a type ...
Case-based querying and prediction: a fuzzy set approach Martine de Calmes(*), Didier Dubois(*), Eyke Hüllermeier(**), Henri Prade(*), and Florence Sèdes(*) (*)

IRIT- Institut de Recherche en Informatique de Toulouse Université Paul Sabatier, 118 route de Narbonne 31062 Toulouse cedex 4, France {decalmes, dubois, prade, sedes}@irit.fr

Abstract - Queries to a database can be made more powerful and user friendly by referring to cases, either for expressing the request, or for computing the answer. This requires some similarity-based reasoning facilities. In this paper, we present an implemented information system (applied to a database describing houses to be rent), based on an approach developed in the fuzzy set and possibility theory setting. This provides an unified framework for expressing user's preferences about what he is looking for, for weighting the importance of requirements, for expressing similarity relations, for referring to examples that he likes and/or counter-examples that he dislikes, and for making case-based predictions.

1. INTRODUCTION There has been recently an increasing interest for recommender systems, e.g., [9]. There are different types of such systems. Many exploit observed correlations between individual customers. Others mainly take advantage of information on the preferences of the users. In both cases, fuzzy set-based approaches are of interest for modelling similarity relations between customers or objects, and for representing preference profiles, e.g., [8] [10]. In the following, we report on an information system which has been implemented in the framework of an experimental platform in information processing, developed at IRIT in Toulouse (http://www.irit.fr/PRETI). The database which is used stores information about 700 houses to be rent for vacations in the south of France. Each house is described in terms of about 25 attributes which may be binary, discrete or numerical. Presently, in PRETI three functionalities which take advantage of the fuzzy set methodology, are available: i) flexible querying, where the user can express his preferences on the values of attributes of interest, and assess the level of importance of each elementary requirement when specifying what he is looking for; ii) querying by examples, where the request is specified through the intensity of attraction (or repulsion) for some examples according to user’s wishes; iii) case-based prediction, where an attribute value (e.g., 0-7803-7280-8/02/$10.00 ©2002 IEEE

(**)

Computer Science Department (LS 1) University of Dortmund D-44221 Dortmund, Germany {[email protected]}

the price) is fuzzily estimated from the specification of other attributes (e.g., the size and the location of the type of house the user is interested in), taking into account the cases stored in the base. In the following, we focus on the two latter functionalities, which both require the handling of similarity relations. Each time, the basics of the fuzzy set-based method which is used, are provided and illustrated on the application. 2. QUERYING BY EXAMPLES Querying data bases by example has been used for a long time. Indeed, it may be convenient for the user to express what he is looking for from examples or prototypes (that are proposed to him by the system, or which are generated by himself). Querying based on examples, for eliciting user's preferences, can provide the necessary information for building a query. Here the evaluation of the requests takes into account the intensity of attraction (or repulsion) for some examples according to user’s wishes. Thus, the user may say to what extent a few examples of items are representative of what he is looking for by using some (finite) preference scale. Then, the relevance of stored items should be evaluated in terms of their similarity with respect to these examples (and may be to counter-examples). These issues are then close to fuzzy case-based reasoning [1]. Examples, as well as counter-examples, are supposed to be described in terms of precisely known attribute values. These attributes are assumed to be relevant and sufficient for describing their main features from a user’s point of view. Then a request should look for the items which are similar to at least one example (w.r.t. all the attributes) and which are dissimilar to all the counter-examples (each time w.r.t. at least one attribute), as proposed in [5]. Moreover we take into account the extent to which each example or counter-example is highly representative of user’s preferences or rejections respectively. The importance of the (relevant) attributes may be also assessed. Thus, the more similar to (at least) one representative example (w.r.t. important attritutes) an item t is, and the more dissimilar t is w.r.t. all representative counter-examples, the more possible t is eligible for the user. This evaluation might be also improved by requiring the

similarity of t with most examples only (see, e.g., [6] for the introduction of a soft quantifier in a weighted min expression). Note that it may be impossible to be simultaneously similar to all the examples that the user likes, since he may like houses which are very different.

Let λj and ρk be the extent to which example j and counterexample k respectively are highly representative of user’s preferences and rejections. Let wi be the level of importance of attribute i in a description. Then, we get c(t) = min[maxj min(λj, mini max(1 − wi, Si(ai(t), aij)), mink max(1-ρk, maxi min(wi, 1 − Si(ai(t) ,bik))]

Suppose first, for simplicity, that all the importance and representativeness weights are equal to 1, the items t are then rank-ordered in terms of the function c(t) = min[maxj mini Si(ai(t), aij), mink maxi 1 − Si(ai(t) ,bik)], where ai(t) is the value of attribute i for item t, aij is the value of attribute i for example j, bik the value of attribute i for counter-example k, where Si is a fuzzy similarity relation on the attribute domain of i (Si is supposed to be reflexive and symmetrical). Clearly, Si(., aij) defines a fuzzy set of values close to aij, while 1 − Si( (., bik) defines a fuzzy set of values not similar to bik, for each attribute i (it may be replaced by a smaller fuzzy set of values significantly different from bik).

which generalizes the above expression, which is recovered when λj, ρk, wi are all equal to1. When λj=0 (or ρk=0) example j (counter-example k) is not taken into account in the expression. This corresponds to the indifference of the user w.r.t. the prototypes which are presented to him in the querying-by-example process. More generally, λj represents the level to which the user likes prototype j and ρk the level to which he dislikes prototype k.

Fig 1

Fig. 1 exhibits the description of 5 protypical houses according to 4 attributes (occupancy, distance to the the sea, distance for sailing, price), chosen as relevant by the user. Moreover he can state the importance of these criteria linguisticaly (on a 6-levels scale : {compulsory, very important, important, desirable, not really important, doesn’t matter} here numericaly encoded as {1, 0.8, 0.6, 0.4, 0.2, 0}). For each presented house, the user assesses how representative of what he likes (or dislikes) is the house, i.e. he provides the intensity with which he likes, or he dislikes the house (on a 6-levels scale here numericaly encoded as 0-7803-7280-8/02/$10.00 ©2002 IEEE

{1, 0.9, 0.7, 0.5, 0.3, 0.1}). In Figure 1, this latter scale is materialized as a series of dots which can be selected. The user may also choose to be indifferent (λj=0=ρj). In this example, he likes house number 1 at the maximum level, house number 2 at a smaller level. He completely dislikes house number 4 and he is indifferent to the two others. Note that we only use ordinal scales here, since the expression of c(t) only involves min, max and the order reversing map of the scales (here denoted by 1 − (.)).

3. CASE-BASED PREDICTION

Fig. 2

Fig. 2 shows the 6 best answers to the query induced by the preferences expressed in Fig. 1, among 20 retrieved houses. The system uses similarity mesures which are assessed by default for each attribute domain ; they may be however tuned by the user. We can observe that in practice the filtering is mainly based on the liked examples. As it can be guessed, in general the counter-examples (the houses which are disliked) have only an impact if no positive example is given, or if there is some inconsistency in the user’s preferences (this may happen if examples which are too close are used and received with opposite opinions about them). Remark - The expression used in the evaluation also provides the starting point for generating a description of the houses which are looked for. This description may then be used for interface needs with the user. Indeed, letting t unspecified in the expression, it defines a compound fuzzy set expression which can be logically analysed. Suppose for simplicity that all the weights are equal to 1, we obtain: c(t) = min[maxj mini Si(., aij), mink maxi 1 − Si(.,bik)] Clearly, Si(., aij) defines a fuzzy set of values close to aij, while 1 − Si(.,bik) defines a fuzzy set of values significantly different from bik, for each attribute i.

Case-based reasoning, in general, assumes the following implicit principle: "similar situations may give similar outcomes". Thus, a similarity relation S between problem descriptions or situations, and a similarity measure T between outcomes are needed. This implicit CBR-principle can be expressed in the framework of fuzzy rules as, "the more similar are the values of the situation attributes in the sense of S, the more possible the similarity of the values of the outcome attributes in the sense of T" [2]. Given a situation s0 associated to an unknown outcome t0 and a current case (s, t), this principle enables us to conclude on the possibility of t0 being equal to a value similar to t. This acknowledges the fact that, often in practice, a database may contain cases which are rather similar with respect to the problem description attributes, but which may be distinct with respect to outcome attribute(s). This emphasizes that case-based reasoning can only lead to cautious conclusions. This can be modelled in terms of the possibility rule [3] "the more similar s and s0, the more possible t and t0 are similar". Then the fuzzy set F of possible values t' for t0 with respect to case (s, t) is given by Ft (t') = min(S(s, s0), T(t, t')). 0 As it can be seen, what is obtained is the fuzzy set T(t, .) of values t' which are T-similar to t, whose possibility level is upper bounded by the global degree S(s,s0) of similarity of s and s0. The max-based aggregation of the various contributions obtained from the comparison with each case (s,t) in the memory M of cases, acknowledges the fact that each new comparison may suggest new possible values for t0. Thus, we obtain the following fuzzy set Es0 of possible values t' for t0 : Es0(t') = max(s,t)∈M min(S(s,s0), T(t,t')). Note that s0 and s represent vectors of attribute values in practice, since usually several attritutes are used for describing the situation. Then s will be obtained as the minbased conjunction of elementary similarity measures attached to each attritute domain. The above expression of Es0(t') can be put in parallel with

Note also that the above expression may account for interactivity between attributes. For instance, the user may be simultaneously interested in two types of houses, one which is ‘small’ with a low price, and another which is ‘large’ but with a medium price, a type of query which is easy to express by referring to examples. Besides, we may think of hybrid queries made of examples and of classical (fuzzy) restrictions expressing what attribute values are undesirable. 0-7803-7280-8/02/$10.00 ©2002 IEEE

the evaluation of a flexible query where expressions of the form c(t) = mini max(1 − wi, Pi(t)) are currently used (where

wi∈[0,1] is the level of importance of requirement Pi). Indeed here a situation is described in terms of a collection of attributes, and here we are looking for cases which are constrained to be similar to s0 w.r.t. the attributes. But rather than exhibiting the fuzzy set of cases similar to s0, we

produce the fuzzy set of the fuzzy sets of values similar to the t-attribute values of these cases (a level 2 fuzzy set reduced here to an ordinary fuzzy set by performing the weighted union of the fuzzy sets of similar values). See [2] for more details and a comparative discussion with other approaches to instance-based prediction.

From a multi-modal possibility distribution as the one in Figure 3, we may select one peak for which we would like to find some explanations if possible. Let P be the fuzzy set of tvalues corresponding to this peak (its membership function is the restriction of the possibility distribution to the peak itself); it represents a fuzzy set of values close to the maximum of the peak. Then the idea is - to look for the set of items which have a non-zero degree of similarity to s0 and whose t-value satisfies P. Namely, we retrieve the fuzzy set of tuples x with membership degrees R(x) = min (S(s, s0), P(t)) where x is of the form x = (s, t, u), where s stands for the vector of attribute values used in the similarity assessment, t is the attribute whose value is predicted, and u represents the vector of remaining attribute values. - for each attribute ui in u, we compute, for all values v, the scalar cardinality C(v) of the cases retrieved at the previous step, and whose ui-value is close to v , i.e.

Fig. 3

For instance, Fig. 3 exhibits a possibility distribution [11] of prices (still in FF !) when the user is inquiring for the possible prices of an house which can accommodate at least 6 people, at approximately 5km from the station and at approximately 2km from the sea. Remark - We might think of replacing the max operation in the above expression by a sum (divided by the number of retrieved cases) in order to reflect the number of similar cases having some value t' (or a value close to t'). However, no difference will be made between a sum of low degrees (reflecting several not very similar cases) and a case maybe unique with a much higher degree of similarity (equal to this sum of low degrees). The above cardinality issue may be handled in more informative way, by computing the fuzzyvalued cardinality of the fuzzy set of cases similar to s0 and whose t-values are close to some value or within some range.

C(v) = Σx min(R(x), Si(ui (x), v))

where Si(ui (x), v) is the similarity relation attached to the attribute domain of ui and ui(x) is the value of ui for tuple x. - C, obtained at the previous step, can be used as an (unnormalized) fuzzy set of ui-values frequently taken by the items corresponding to the peak of the distribution in which we are interested.

Besides, Es0 may be a function with several local maxima. For instance, the situations s correspond to the description of houses, and t to their prices; it may happen that houses which are similar w.r.t. some subset of attributes (used in the specification of s0) have different prices. Providing the user with Es0 calls immediatly for the explanation of this matter of fact. Assume that the values of other attributes which are not involved in s or t are also available for the cases stored in the memory. Then we may try to find out an explanation of the existence of several classes of prices in terms of those attributes. This amounts to compute the fuzzy set of attributes which take significantly different values for similar cases (in terms of s-attributes and t-value).

0-7803-7280-8/02/$10.00 ©2002 IEEE

Fig. 4

If C focuses on some significant subset of the attribute domain of ui (which can be detected by computing the entropy), we have found the non-trivial result that most of the retrieved items corresponding to the peak have their ui-value in C (or more precisely in the the set of typical values associated with the distribution C, using a method such as the one in [4]) . For instance, in the above example we would discover that the leftest peak of the distribution corresponds to houses

without dish-washing machine. This is confirmed by adding in the description of the type of houses we are interested in (accommodation for at least 6 people, at approximately 5km from the station and at approximately 2km from the sea) that a dish-washing machine is required. The result of the prediction of the price for this new description is given in Fig. 4 (where the leftest mode has disappeared). It could be also checked that the rightest mode of the distribution corresponds to houses which can accommodate groups of people much larger than 6.

4. CONCLUSION When querying a database, the user may have intricated goals in mind: retrieving items corresponding to some requirements, referring to similar cases, using stored data for prediction purposes, trying to figure out range of attribute values for classes of items, looking for explanations. In all these operations flexibility can be introduced with profit, as shown by the implemented system PRETI. The fuzzy logic-based techniques demonstrated in this paper could be still more interesting for querying multimedia databases, as advocated in [7] or in [5].

5. REFERENCES [1]

Dubois D., Esteva F., Garcia P., Godo L., Lopez de Mantaras R. and Prade H. (1998) Fuzzy set modelling in case-based reasoning. Int. J. of Intelligent Systems, 13, 301-374. [2] Dubois D., Hüllermeier E., Prade H. (2000) Flexible control of casebased prediction in the framework of possibility theory. In: Advances in Case-Based Reasoning (Proc.5th Eureopean Worshop, EWCBR 2000, 6-9 sept.) , Trento, Italie. (E.Banzieri, L.Portinal, Eds., LNCS n°1898), Springer-Verlag , Berlin Heidelberg , 61-73. [3] Dubois D., Prade H. (1996) What are fuzzy rules and how to use them. Fuzzy Set and Systems, 84, 169-185. [4] Dubois D., Prade H. , Rannou E. (1998) An improved method for finding typical values. Proceedings of 7th International Conference on Information Processing and Management of Uncertainty in Knowledge-based Systems (IPMU'98) , Paris, Editions EDK , 18301837. [5] Dubois D., Prade H. Sèdes F. (2001) Fuzzy logic techniques in multimedia database queyring: A preliminary investigation of the potentials. IEEE Transactions on Knowledge and Data Engineering, 13(3), 383-392. [6] Dubois D., Prade H. Testemale C. (1988) Weighted fuzzy pattern matching, Fuzzy Sets and Systems, 28, 313-331. [7] Fagin R. (1998) Fuzzy queries in multimedia database systems. Proc. 7th ACM Symp. on Principles of Database Systems, Seattle, 1-10. [8] Perny P., Zucker J.D. (2001) Preference-based search and machine learning for collaborative filtering: the "Film-Conseil" movie recommender system. Information, Interaction, Intelligence, 1 (1), 948. [9] Resnick P., Varian H.R. Recommender systems. Communications of the ACM, 40 (3), 1997. [10] Yager R. R. (2001) Fuzzy logic methods in recommender systems. Tech. Rep. MII-2116, Iona College, New Rochelle, NY. [11] Zadeh L.A. (1978) Fuzzy sets as a basis for a theory of possibility. Fuzzy Sets and Systems, 1, 3-28.

0-7803-7280-8/02/$10.00 ©2002 IEEE