280 likes | 528 Views
Gradient Descent Rule Tuning. See pp. 207-210 in text book. Rules. Consider a rule base with M rules, r th rule has the form IF x 1 is T r,1 AND … AND x n is T r,n THEN y is y r (or y is y r + other stuff ) TSK fuzzy system has mathematical form. Membership function parameters
E N D
Gradient Descent Rule Tuning See pp. 207-210 in text book
Rules Consider a rule base with • M rules, rth rule has the form • IF x1 is Tr,1 AND … AND xn is Tr,n THEN y is yr (or y is yr + other stuff) • TSK fuzzy system has mathematical form
Membership function parameters • Center, right-width, left-width • Consequent parameters • 3 level (layer) structure of f(x) • Level (layer) 1: • For each rule Compute all membership values for each term, compute product, store as zr • Level (layer) 2: • Compute product of membership values and consequents, sum: n • Sum membership values: d • Level (layer) 3: • Compute quotient: f = n/d
Membership function parameters Center, right-width, left-width Consequent parameters Why not s, z and triangular membership functions? Why Gaussian membership functions? Rule parameters
Choose parameters to minimize the error Corresponds to a blind person descending a mountain by finding the steepest descending slope and moving in that direction Slope is determined by differentiation (computing the “gradient”) Chain rule helps tremendously. Gradient Descent
Gradient Descent Math • Consider a sequence of input/output measurements: (x0p, y0p) • As each input/output measurement pair arrives (and before the next input/output measurement pair arrives), we want to adjust our model parameters to reduce the error ep = [f(x0p)-y0p]2/2 • Dropping the sub-and-super-scripts e = [f(x)-y]2/2 • The gradient descent algorithm for any vector-valued parameter s is
Given x and y For ybar Modify for beta Modify for xbar Modify for sigma
Gradient Descent • For a generic parameter • For ybar, see previous slide • For xbar • For sigma • Abstraction saves work.
One LV Example FL System • LV X: Term set: Negative, Zero, Positive • 3 rules • Antecedent matrix, Consequent matrix • Gaussian membership functions • Super membership function • Fuzzy function parameters • TSK fuzzy function • Gradient Descent parameter tuning
One LV Example FL System • LV X: Negative5, Zero, Positive5 • 3 rules • If x is Negative5 then y is 25 • If x is Zero then y is 0 • If x is Positive5 then y is 25 • Antecedent matrix and consequent matrix
One LV Example FL System • LV X: Negative5, Zero, Positive5 • Gaussian membership functions
One LV Example FL System • Super membership function
One LV Example FL System • TSK fuzzy function • Gradient Descent parameter tuning
One LV Example FL System • TSK fuzzy function, Gradient Descent parameter tuning ybar
One LV Example FL System • TSK fuzzy function, Gradient Descent parameter tuning ybar Heart and soul of gradient descent algorithm to tune ybar using experimental data. Engineers derive these expressions. Computers compute with these expressions, often iteratively, to improve designs. Note interplay of theory and real-world data.
One LV Example FL System • TSK fuzzy function, Gradient Descent parameter tuning xbar
One LV Example FL System • TSK fuzzy function, Gradient Descent parameter tuning xbar
One LV Example FL System • TSK fuzzy function, Gradient Descent parameter tuning xbar
One LV Example FL System • TSK fuzzy function, Gradient Descent parameter tuning xbar
Two LV Example FL System • Temperature term set: Cold, Comfortable, Hot • Humidity term set: Wet, Dry • 6 rules • Antecedent matrix, Consequent matrix • Gaussian membership functions • Super membership function • Fuzzy function parameters • TSK Fuzzy Function • Gradient descent parameter tuning
Two LV Example FL System • Temperature term set: Comfortable, Warm, Hot • Humidity term set: Wet, Dry • 6 rules • If T is Comfortable and H is Wet then HI is • If T is Comfortable and H is Dry then HI is • If T is Warm and H is Wet then HI is • If T is Warm and H is Dry then HI is • If T is Hot and H is Wet then HI is • If T is Hot and H is Dry then HI is
Two LV Example FL System: Matrices • If T is Comfortable and H is Wet then HI is • If T is Comfortable and H is Dry then HI is • If T is Warm and H is Wet then HI is • If T is Warm and H is Dry then HI is • If T is Hot and H is Wet then HI is • If T is Hot and H is Dry then HI is
Two LV Example FL System • Temperature term set: Cold, Comfortable, Hot • Humidity term set: Wet, Dry • Gaussian membership functions • Super membership function
Two LV Example FL System • TSK Fuzzy Function • Gradient descent parameter tuning
Two LV Example FL System • Gradient descent parameter tuning