123.

c++ neural networks and fuzzy logic C++ Neural Networks and Fuzzy Logic
by Valluru B. Rao
M&T Books, IDG Books Worldwide, Inc.
ISBN: 1558515526   Pub Date: 06/01/95
  

Previous Table of Contents Next


Databases and Queries

Imagine that you are interested in the travel business. You may be trying to design special tours in different countries with your own team of tour guides, etc. , and you want to identify suitable persons for these positions. Initially, let us say, you are interested in their own experiences in traveling, and the knowledge they possess, in terms of geography, customs, language, and special occasions, etc. The information you want to keep in your database may be something like, who the person is, the person’s citizenship, to where the person traveled, when such travel occurred, the length of stay at that destination, the person’s languages, the languages the person understands, the number of trips the person made to each place of travel, etc. Let us use some abbreviations:


cov—country visited
lov—length of visit (days)
nov—number of visits including previous visits
ctz—citizenship
yov—year of visit
lps—language (other than mother tongue) with proficiency to speak
lpu—language with only proficiency to understand
hs—history was studied (1—yes, 0—no)

Typical entries may appear as noted in Table 16.1.

Table 16.1 Example Database

Name age ctz cov lov nov yov lps lpu hs
John Smith 35 U.S. India 4 1 1994 Hindi 1
John Smith 35 U.S. Italy 7 2 1991 Italian 1
John Smith 35 U.S. Japan 3 1 1993 0

When a query is made to list persons that visited India or Japan after 1992 for 3 or more days, John Smith’s two entries will be included. The conditions stated for this query are straightforward, with lov [ge] 3 and yov > 1992 and (cov = India or cov = Japan).

Relations in Databases

A relation from this database may be the set of quintuples, (name, age, cov, lov, yov). Another may be the set of triples, (name, ctz, lps). The quintuple (John Smith, 35, India, 4, 1994) belongs to the former relation, and the triple (John Smith, U.S., Italian) belongs to the latter. You can define other relations, as well.

Fuzzy Scenarios

Now the query part may be made fuzzy by asking to list young persons who recently visited Japan or India for a few days. John Smith’s entries may or may not be included this time since it is not clear if John Smith is considered young, or whether 1993 is considered recent, or if 3 days would qualify as a few days for the query. This modification of the query illustrates one of three scenarios in which fuzziness can be introduced into databases and their use.

This is the case where the database and relations are standard, but the queries may be fuzzy. The other cases are: one where the database is fuzzy, but the queries are standard with no ambiguity; and one where you have both a fuzzy database and some fuzzy queries.

Fuzzy Sets Revisited

We will illustrate the concept of fuzziness in the case where the database and the queries have fuzziness in them. Our discussion is guided by the reference Terano, Asai, and Sugeno. First, let us review and recast the concept of a fuzzy set in a slightly different notation.

If a, b, c, and d are in the set A with 0.9, 0.4, 0.5, 0, respectively, as degrees of membership, and in B with 0.9, 0.6, 0.3, 0.8, respectively, we give these fuzzy sets A and B as A = { 0.9/a, 0.4/b, 0.5/c} and B = {0.9/a, 0.6/b, 0.3/c, 0.8/d}. Now A[cup]B = {0.9/a, 0.6/b, 0.5/c, 0.8/d} since you take the larger of the degrees of membership in A and B for each element. Also, A[cap]B = {0.9/a, 0.4/b, 0.3/c} since you now take the smaller of the degrees of membership in A and B for each element. Since d has 0 as degree of membership in A (it is therefore not listed in A), it is not listed in A[cap]B.

Let us impart fuzzy values (FV) to each of the attributes, age, lov, nov, yov, and hs by defining the sets in Table 16.2.

Table 16.2 Fuzzy Values for Example Sets

Fuzzy Value Set
FV(age) { very young, young, somewhat old, old }
FV(nov) { never, rarely, quite a few, often, very often }
FV(lov) { barely few days, few days, quite a few days, many days }
FV(yov) {distant past, recent past, recent }
FV(hs) { barely, adequately, quite a bit, extensively }

The attributes of name, citizenship, country of visit are clearly not candidates for having fuzzy values. The attributes of lps, and lpu, which stand for language in which speaking proficiency and language in which understanding ability exist, can be coupled into another attribute called flp (foreign language proficiency) with fuzzy values. We could have introduced in the original list an attribute called lpr ( language with proficiency to read) along with lps and lpu. As you can see, these three can be taken together into the fuzzy-valued attribute of foreign language proficiency. We give below the fuzzy values of flp.

    FV(flp) = {not proficient, barely proficient, adequate,              proficient, very proficient } 

Note that each fuzzy value of each attribute gives rise to a fuzzy set, which depends on the elements you consider for the set and their degrees of membership.


Previous Table of Contents Next

Copyright © IDG Books Worldwide, Inc.



C++ Neural Networks and Fuzzy Logic
C++ Neural Networks and Fuzzy Logic
ISBN: 1558515526
EAN: 2147483647
Year: 1995
Pages: 139

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net