While Mamdani (from Lecture 6) outputs fuzzy shapes that need to be geometrically "defuzzified," the Takagi-Sugeno model uses mathematical linear equations to determine the output of each rule. This makes it highly efficient and very popular in machine learning algorithms.

This is a breakdown of the 6-layer ANFIS architecture and the step-by-step numerical example covered in the slides.

The 6-Layer ANFIS Architecture

Unlike the 5-layer Mamdani model, ANFIS uses 6 layers to process the data:


Step-by-Step Numerical Example Walkthrough

We want to find the deviation in prediction for a specific training scenario.

The Setup:

Layer 1

The inputs pass directly through.

Layer 2 (Fuzzification)

Based on the modified right-angled triangle graphs (using the calculated d1 and d2 base widths):

Layer 3 (Firing Strengths)

We multiply the membership values to find the strength (w) of the 4 activated rules:

  1. w1 (LW and SM) = 0.900990×0.8=0.720792

  2. w2 (LW and LR) = 0.900990×0.2=0.180198

  3. w3 (H and SM) = 0.099009×0.8=0.079207

  4. w4 (H and LR) = 0.099009×0.2=0.019802

Layer 4 (Normalization)

We normalize the weights by dividing each w by the sum of all w's.

(Note: Because of how these specific triangles are structured, the sum of w1+w2+w3+w4 happens to equal 1.0. Therefore, dividing by 1.0 means the normalized weights (w¯) are identical to the raw weights in this specific instance).

Layer 5 (Rule Outputs)

First, we use the rule coefficients (ai,bi,ci) from the provided table to calculate the mathematical output (y) for each rule:

Next, Layer 5 multiplies these rule outputs by their respective normalized firing strengths:

Layer 6 (Final Calculation)

The overall predicted output is simply the sum of the Layer 5 values:

6O1=1.528079+0.491941+0.179008+0.056832=2.255860

Finally, to find the deviation in prediction, we subtract our predicted output from the known target output: