What is all the Fuzz about? Engineering Fuzzy Systems CPSC 433 - - PDF document

what is all the fuzz about
SMART_READER_LITE
LIVE PREVIEW

What is all the Fuzz about? Engineering Fuzzy Systems CPSC 433 - - PDF document

Fuzzy Systems in Knowledge What is all the Fuzz about? Engineering Fuzzy Systems CPSC 433 Christian Jacob Dept. of Computer Science Dept. of Biochemistry & Molecular Biology University of Calgary Christian Jacob, University of Calgary


slide-1
SLIDE 1

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

CPSC 433 Christian Jacob

  • Dept. of Computer Science
  • Dept. of Biochemistry & Molecular Biology

University of Calgary

What is all the Fuzz about?

Fuzzy Systems

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Systems in Knowledge Engineering

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • 1. Motivation
  • 2. Fuzzy Sets
  • 3. Fuzzy Numbers
  • 4. Fuzzy Sets and Fuzzy Rules
  • 5. Extracting Fuzzy Models from Data
  • 6. Examples of Fuzzy Systems

Fuzzy Systems

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Fuzzy logic was introduced by Lot Zadeh

UC Berkeley in 1965.

  • Fuzzy logic is based on fuzzy set theory, an

extension of classical set theory.

  • Fuzzy logic attempts to formalize

approximate knowledge and reasoning.

  • Fuzzy logic did not attract any attention until

the 1980s fuzzy controller applications.

What does Fuzzy Logic mean?

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Humans primarily use fuzzy terms: large, sma,

fast, slow, warm, cold, ...

  • W

e say: If the weather is nice and I have a little time, I will

probably go for a hike along the Bow.

  • W

e dont say: If the temperature is above 24 degrees and the cloud

cover is less than 10, and I have 3 hours time, I will go for a hike with a probability of 0.47.

Fuzzy is Just Human

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Zadeh: Make use of the leeway of fuzziness.
  • Fuzziness as a principle of economics:
  • Precision is expensive.
  • Only apply as much precision to a problem as

necessary.

  • Example: Backing into a parking space

How long would it take if we had to park a car with a

precision of ±2 mm?

Fuzzy is Economical

slide-2
SLIDE 2

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • 1. Motivation
  • 2. Fuzzy Sets
  • 3. Fuzzy Numbers
  • 4. Fuzzy Sets and Fuzzy Rules
  • 5. Extracting Fuzzy Models from Data
  • 6. Examples of Fuzzy Systems

Fuzzy Systems

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Example: the set of young people
  • W

e can dene a characteristic function for this set:

Basics of Fuzzy Sets

young = {x ∈ P | age(x) ≤ 20}

µyoung(x) =

  • 1

: age(x) ≤ 20 : 20 < age(x)

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Fuzzy set theory oers a variable notion of

membership:

  • A person of age 25 could still belong to the set of

young people, but only to a degree of less than one, say 0.9.

  • Now the set of young contains people with ages

between 20 and 30, with a linearly decreasing degree

  • f membership.

Basics of Fuzzy Sets

µyoung(x) =    1 : age(x) ≤ 20 1− age(x)−20

10

: 20 < age(x) ≤ 30 : 30 < age(x)

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Membership Function

µyoung(x) =    1 : age(x) ≤ 20 1− age(x)−20

10

: 20 < age(x) ≤ 30 : 30 < age(x)

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Shapes for Membership Fcts.

Trapezoid: [a,b,c,d] Triangle: [a,b,c] Gaussian: [a,] Singleton: [a,m]

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Parameters of FMFs

  • Support: sA := x : Ax > 0
  • The area where the membership function is positive.
  • Core: cA := x : Ax = 1
  • The area for which elements have a maximum degree
  • f membership to the fuzzy set A.
slide-3
SLIDE 3

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Cut: A := x : Ax =
  • The cut through the membership function of A at

height a.

  • Height: hA := maxx Ax
  • The maximum value of the membership function of

A.

Parameters of FMFs

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Support: sA := x : Ax > 0

Trapezoid: [a,b,c,d] Triangle: [a,b,c] Gaussian: [a,] Singleton: [a,m]

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Core: cA := x : Ax = 1

Trapezoid: [a,b,c,d] Triangle: [a,b,c] Gaussian: [a,] Singleton: [a,m] m=1

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Cut: A := x : Ax =

Trapezoid: [a,b,c,d] Triangle: [a,b,c] Gaussian: [a,] Singleton: [a,m]

  • CPSC 433 Articial Intelligence: An Introduction

Christian Jacob, University of Calgary

Height: hA := maxx Ax

Trapezoid: [a,b,c,d] Triangle: [a,b,c] Gaussian: [a,] Singleton: [a,m] Height = m Height = 1 Height = 1 Height = 1

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Linguistic V ariables

  • The covering of a variable domain with several

fuzzy sets, together with a corresponding semantics, denes a linguistic variable.

  • Example: linguistic variable ag
slide-4
SLIDE 4

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Using fuzzy sets, we can incorporate the fact

that no sharp boundaries between groups, such as young, middleaged, and old, exist.

  • The corresponding membership functions
  • verlap in certain areas, forming noncrisp

fuzzy boundaries.

  • This compositional way of dening fuzzy sets
  • ver a domain of a variable is called granulation.

Granulation

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Granulation results in a grouping of objects

into imprecise clusters of fuzzy granules.

  • The objects forming a granule are drawn

together by similarity.

  • This can be seen as a form of fuzzy data

compression.

Fuzzy Granules

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • If expert knowledge on a domain is not

available, an automatic granulation is used.

  • Standard granulation using an odd number of

membership functions:

  • NL: negative large, NM: negative medium, NS:

negative small, Z: zero, ...

Finding Fuzzy Granules

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • 1. Motivation
  • 2. Fuzzy Sets
  • 3. Fuzzy Numbers
  • 4. Fuzzy Sets and Fuzzy Rules
  • 5. Extracting Fuzzy Models from Data
  • 6. Examples of Fuzzy Systems

Fuzzy Systems

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Realworld measurements are always

imprecise.

  • Usually, such imprecise measurements are

modeled through

  • a crisp number x, denoting the most typical value,
  • together with an interval, describing the amount of

imprecision.

  • In a linguistic sense: about x

Fuzzy vs. Crisp Numbers

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Fuzzy numbers are a special type of fuzzy sets

with specic membership functions:

  • A must be normalized cA ∅.
  • A must be singular. There is precisely one point

which lies inside the core, modeling the typical value = modal value of the fuzzy number.

  • A must be monotonically increasing left of the core

and monotonically decreasing on the right only one peak!.

Fuzzy Numbers as Fuzzy Sets

slide-5
SLIDE 5

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Typically, triangular membership functions are

chosen for fuzzy numbers.

Fuzzy Number Example

1 2

  • 1
  • 2

About 0 About 1 About 2 CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Number Operations

  • For practical purposes, we can calculate the

result of applying a monotonical operation ⊗

  • n fuzzy numbers as follows:
  • Subdivide Ax and Bx into monotonically

increasing and decreasing parts.

  • Perform the operation ⊗ jointly on the increasing

decreasing parts of numbers A and B.

  • Plateaus can be dealt with in a single computation

step.

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Let A and B be fuzzy numbers, and ⊗ a strongly

monotonical operation.

  • Let a1, a2 and b1, b2 be the intervals in which Ax and

Bx are monotonically increasing decreasing.

  • If there exist subintervals 1, 2 ⊆ a1, a2 and 1, 2 ⊆

b1, b2, such that

∀ xA ∈ α1, α2, ∀ xB ∈ β1, β2: μAxA = μBxB = λ

then

∀ t ∈ α1 ⊗ β1, α2 ⊗ β2: μA ⊗ Bt = λ.

Fuzzy Number Operations

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Addition

µA + B(t) = 1.0 t = ...

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Addition

µA + B(t) = 1.0 t = 40 + 70 = 110

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Addition

µA + B(t) = 0.4 t [..., ...]

slide-6
SLIDE 6

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Addition

µA + B(t) = 0.4 t [20+64, 30+64]

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Addition

µA + B(t) = 0.4 t [20+64, 30+64] = [84, 94]

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Addition

µA + B(t) = 0.4 t = ...

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Addition

µA + B(t) = 0.4 t = 46 + 76 = 122

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Addition

µA + B(t) = 0.4 t = 46 + 76 = 122

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Addition

Support: sA + B = [..., ...]

slide-7
SLIDE 7

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Addition

Support: sA + B = [10+60, 50+80] = [70, 130]

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Addition

… and the rest by linear interpolation: Done!

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Monotonic Function

µf(A)(y) = max{µA(x) | ∀x : f(x) = y}

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • 1. Motivation
  • 2. Fuzzy Sets
  • 3. Fuzzy Numbers
  • 4. Fuzzy Sets and Fuzzy Rules
  • 5. Extracting Fuzzy Models from Data
  • 6. Examples of Fuzzy Systems

Fuzzy Systems

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Let A and B be fuzzy sets.
  • Intersection conjunction:

A∩Bx = min μAx, μBx

  • Union disjunction:

A∪Bx = max μAx, μBx

  • Complement:

¬Ax = 1 μAx

Operations on Fuzzy Sets

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Union & Intersection

A∩Bx = min μAx, μBx A∪Bx = max μAx, μBx

slide-8
SLIDE 8

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Union & Intersection

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Union & Intersection: Alternatives

µA∩B(x) = min{µA(x),µB(x)} µA∪B(x) = max{µA(x),µB(x)} µA∩B(x) = µA(x)·µB(x) µA∪B(x) = min{µA(x)+µB(x),1}

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Fuzzy Rules

IF temperature = low THEN cooling valve = half open. IF temperature = medium THEN cooling valve = almost

  • pen.

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

MaxMin Inference

Max-Min Inference

Approximate Reasoning

IF temperature = low THEN cooling valve = half open IF temperature = medium THEN cooling valve = almost open

temperature = medium temperature = low valve = almost open valve = half open in

  • ut

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

MaxMin Inference

Max-Min Inference

Approximate Reasoning

IF temperature = low THEN cooling valve = half open IF temperature = medium THEN cooling valve = almost open

temperature = medium temperature = low valve = almost open valve = half open in

  • ut
  • 1. Input of crisp

value

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

MaxMin Inference

Max-Min Inference

Approximate Reasoning

IF temperature = low THEN cooling valve = half open IF temperature = medium THEN cooling valve = almost open

temperature = medium temperature = low valve = almost open valve = half open in

  • ut
  • 1. Input of crisp

value

  • 2. Fuzzification
slide-9
SLIDE 9

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

MaxMin Inference

Max-Min Inference

Approximate Reasoning

IF temperature = low THEN cooling valve = half open IF temperature = medium THEN cooling valve = almost open

temperature = medium temperature = low valve = almost open valve = half open in

  • ut
  • 1. Input of crisp

value

  • 2. Fuzzification
  • 3. Inference

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

MaxMin Inference

Max-Min Inference

Approximate Reasoning

IF temperature = low THEN cooling valve = half open IF temperature = medium THEN cooling valve = almost open

temperature = medium temperature = low valve = almost open valve = half open in

  • ut
  • 1. Input of crisp

value

  • 2. Fuzzification
  • 3. Inference
  • 4. Output set

Fuzzy OR

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

MaxMin Inference

Max-Min Inference

Approximate Reasoning

IF temperature = low THEN cooling valve = half open IF temperature = medium THEN cooling valve = almost open

temperature = medium temperature = low valve = almost open valve = half open in

  • ut
  • 1. Input of crisp

value

  • 2. Fuzzification
  • 3. Inference
  • 4. Output set

Fuzzy OR

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

MaxMin Inference

Max-Min Inference

Approximate Reasoning

IF temperature = low THEN cooling valve = half open IF temperature = medium THEN cooling valve = almost open

temperature = medium temperature = low valve = almost open valve = half open in

  • ut
  • 1. Input of crisp

value

  • 2. Fuzzification
  • 3. Inference
  • 4. Output set
  • 5. Defuzzification

Center of gravity CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • 1. Motivation
  • 2. Fuzzy Sets
  • 3. Fuzzy Numbers
  • 4. Fuzzy Sets and Fuzzy Rules
  • 5. Extracting Fuzzy Models from Data
  • 6. Examples of Fuzzy Systems

Fuzzy Systems

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Approximate representation of functions,

contours, and relations

Extracting Fuzzy Models: Graphs

slide-10
SLIDE 10

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

Global Granulation of Input Space

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

FixedGrid Rules Extraction

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

AdaptiveGrid Rules Extraction

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • 1. Motivation
  • 2. Fuzzy Sets
  • 3. Fuzzy Numbers
  • 4. Fuzzy Sets and Fuzzy Rules
  • 5. Extracting Fuzzy Models from Data
  • 6. Examples of Fuzzy Systems

Fuzzy Systems

CPSC 433 Articial Intelligence: An Introduction Christian Jacob, University of Calgary

  • Berthold, M., and Hand, D. J. 2003. Inteigent Data
  • Analysis. Berlin, Springer.
  • Bothe, H. 1995. Fuzzy Logic Einfhrung in die Theori

und Anwendungen. Berlin, Springer.

  • Kasabov, N. 1996. Foundations of Neural Networks, Fuzzy

Systems, amd Knowledge Engineering. Cambridge, MA, MIT Press.

References