24
Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto http:// www.sims.berkeley.edu/~hearst/irbook / Data Mining Introductory and Advanced Topics by Margaret H. Dunham http://www.engr.smu.edu/~mhd/book Introduction to “Type-2 Fuzzy Logic by Jenny Carter

Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

Embed Size (px)

Citation preview

Page 1: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

Fuzzy Sets

Introduction/Overview

Material for these slides obtained from:Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

http://www.sims.berkeley.edu/~hearst/irbook/Data Mining Introductory and Advanced Topics by Margaret H. Dunham

http://www.engr.smu.edu/~mhd/bookIntroduction to “Type-2 Fuzzy Logic by Jenny Carter

Page 2: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 2

Fuzzy Sets and Logic Fuzzy Set: Set membership function is a real

valued function with output in the range [0,1]. f(x): Probability x is in F. 1-f(x): Probability x is not in F. EX:

T = {x | x is a person and x is tall} Let f(x) be the probability that x is tall Here f is the membership function

Page 3: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 3

Fuzzy Sets

Page 4: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 4

Fuzzy Set Theory A fuzzy subset A of U is characterized by a

membership function (A,u) : U [0,1]which associates with each element u of U a

number (u) in the interval [0,1] Definition

Let A and B be two fuzzy subsets of U. Also, let ¬A be the complement of A. Then,

(¬A,u) = 1 - (A,u) (AB,u) = max((A,u), (B,u)) (AB,u) = min((A,u), (B,u))

Page 5: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 5

The world is imprecise. Mathematical and Statistical techniques often

unsatisfactory. Experts make decisions with imprecise data in an

uncertain world. They work with knowledge that is rarely defined

mathematically or algorithmically but uses vague terminology with words.

Fuzzy logic is able to use vagueness to achieve a precise answer. By considering shades of grey and all factors simultaneously, you get a better answer, one that is more suited to the situation.

© Jenny Carter

Page 6: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 6

Fuzzy Logic then . . . is particularly good at handling uncertainty,

vagueness and imprecision. especially useful where a problem can be

described linguistically (using words). Applications include:

robotics washing machine

control nuclear reactors focusing a camcorder information retrieval train scheduling© Jenny Carter

Page 7: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 7

Crisp Sets if you are tall and can run fast you

should consider basketball

Figure 1: A crisp way of modeling tallness

© Jenny Carter

Page 8: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 8

Crisp Sets

Figure 2: The crisp version of short

© Jenny Carter

Page 9: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 9

Crisp Sets Different heights have same ‘tallness’

© Jenny Carter

Page 10: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 10

Fuzzy Sets The shape you see is known as the membership

function

© Jenny Carter

Page 11: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 11

Fuzzy Sets Now we have added some possible values on the

height - axis

© Jenny Carter

Page 12: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 12

Fuzzy Sets

Shows two membership functions: ‘tall’ and ‘short’

© Jenny Carter

Page 13: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 13

Notation For any fuzzy set, A, the function µA

represents the membership function for which µA(x) indicates the degree of membership of x (of the universal set X) in set A. It is usually expressed as a number between 0 and 1:

© Jenny Carter

Page 14: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 14

Notation

For the member, x, of a discrete set with membership µ we use the notation µ/x . In other words, x is a member of the set to degree µ. Discrete sets are written as:

A = µ1/x1 + µ2/x2 + .......... + µn/xn

Or

where x1, x2....xn are members of the set A and µ1, µ2, ...., µn are their degrees of membership. A continuous fuzzy set A is written as:

© Jenny Carter

Page 15: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 15

Fuzzy Sets The members of a fuzzy set are members to some

degree, known as a membership grade or degree of membership.

The membership grade is the degree of belonging to the fuzzy set. The larger the number (in [0,1]) the more the degree of belonging. (N.B. This is not a probability)

The translation from x to µA(x) is known as fuzzification.

A fuzzy set is either continuous or discrete. Graphical representation of membership functions

is very useful.

© Jenny Carter

Page 16: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 16

Fuzzy Sets - Example

“numbers close to 1”

© Jenny Carter

Page 17: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 17

Fuzzy Sets - Example

Again, notice the overlapping of the sets reflecting the real worldmore accurately than if we were using a traditional approach.

© Jenny Carter

Page 18: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 18

Imprecision

Words are used to capture imprecise notions, loose concepts or perceptions.

© Jenny Carter

Page 19: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 19

Rules

Rules often of the form:

IF x is A THEN y is B

where A and B are fuzzy sets defined on the universes of discourse X and Y respectively.

if pressure is high then volume is small; if a tomato is red then a tomato is ripe.

where high, small, red and ripe are fuzzy sets.

© Jenny Carter

Page 20: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 20

Example - Dinner for two(p2-21 of FL toolbox user guide)

Rule 2 If service is good, then tip is average

Rule 3 If service is excellent or food is delicious, then tip is generous

The inputs are crisp (non-fuzzy) numbers limited to a specific range

All rules are evaluated in parallel using fuzzy reasoning

The results of the rules are combined and distilled (de-fuzzyfied)

The result is a crisp (non-fuzzy) number

Output

Tip (5-25%)

Dinner for two: this is a 2 input, 1 output, 3 rule system

Input 1

Service (0-10)

Input 2

Food (0-10)

Rule 1 If service is poor or food is rancid, then tip is cheap

© Jenny Carter

Page 21: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 21

Dinner for two

1. Fuzzify the input:

2. Apply Fuzzy operator

© Jenny Carter

Page 22: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 22

Dinner for two

3. Apply implication method

© Jenny Carter

Page 23: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 23

Dinner for two

4. Aggregate all outputs

© Jenny Carter

Page 24: Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto

CSE 5331/7331 F07 24

Dinner for two

5. defuzzify

Various approaches e.g.

centre of area mean of max

© Jenny Carter