Fuzzy Logic

Write 3-5 fuzzy rules that determine heart attack risk, using:

Three ‘universes of discourse’ (UoD): diet, exercise, and risk

2 or 3 fuzzy classes per UoD, and their membership functions (represent graphically)

Show fuzzy inference for one set of sample data

Fuzzy Rules

  1. Diet is low AND Exercise is high → Balanced

  2. Diet is high OR Exercise is low → Unbalanced

  3. Balanced → Risk is low

  4. Unbalanced → Risk is high

Membership Functions

Diet is high:

diet high membership chart

Diet is low:

diet low membership chart

Exercise is high:

exercise high membership chart

Exercise is low:

exercise low membership chart

Balanced:

balanced membership chart

Unbalanced:

unbalanced membership chart

Risk is high:

risk high membership chart

Risk is low:

risk low membership chart

Sample Data

Diet: consume 3000 calories per day.

Exercise: burn 1000 calories per day.

What is the risk of heart disease?

Fuzzification

Membership for Diet High:

Membership for Diet Low:

Membership for Exercise High:

Membership for Exercise Low:

Rule Evaluation

  1. Diet is low AND Exercise is high → Balanced

    Membership for Balanced:

  2. Diet is high OR Exercise is low → Unbalanced

    Membership for Unbalanced:

  3. Balanced → Risk is low

    Membership for Risk Low:

    Likelihood of heart disease cut off:

    Membership function for Risk Low:

    risk low cut off membership chart

  4. Unbalanced → Risk is high

    Membership for Risk High:

    Likelihood of heart disease cut off:

    Membership function for Risk High:

    risk high cut off membership chart

Aggregation

The aggregated membership for Risk High and Risk Low:

aggregated risk membership chart

The aggregated Risk function:

Defuzzification

The Center of Gravity (COG) method is used for the defuzzification.

The integration of the aggregated Risk membership function returns a likelihood of 47.5% of heart disease.

Valid HTML 4.01 Valid CSS