- Human knowledge
- Conscious knowledge
- Can be expressed explicitly in words
- Human expert writes down fuzzy IF-THEN rules
- Use the rules to build a fuzzy system
- Can be expressed explicitly in words
- Subconscious knowledge
- Human expert knows what to do but unable to express in words or rules
- Human expert demonstrate system operation
- Collect input-output data
- Generate fuzzy IF-THEN rules from the input-output pairs
- May leave free parameters for optimizing or training the fuzzy system
- Human expert knows what to do but unable to express in words or rules
- Mixure
- Human expert writes down fuzzy rules
- Rules not fully describing the behavior of the expert due to overlooked details
- Rules not matching the behavior of the expert due to subjective interpretation of the rules
- Human expert writes down fuzzy rules
- Conscious knowledge
- Designing fuzzy systems from input-output data
- Learning from examples
- Gradient descent training
- Recursive least squares
- Clustering
Learning from Examples
N-Dimensional Input
$$x = (x_1, ..., x_n)$$
Output
$$y \in V = [\alpha_y, \beta_y]$$
Input-Output Pair
$$x^k = (x_1^k, ..., x_n^k), y^k (k = 1, ..., N)$$
Procedure
- Define input & output fuzzy sets
- Define $$N_i$$ fuzzy sets $$A_i^j (j = 1, ..., N_i)$$ for each input variable $$x_i$$
- Complete on $$[\alpha_i, \beta_i]$$
- Define $$N_y$$ fuzzy sets $$B^j (j = 1, ..., N_y)$$ for output $$y$$
- Complete on $$[\alpha_y, \beta_y]$$
- Maximum number of rules: $$\left{\prod^n_{i=1} N_i\right} N_y$$
- Define $$N_i$$ fuzzy sets $$A_i^j (j = 1, ..., N_i)$$ for each input variable $$x_i$$
- Generate fuzzy rules from input-output data
- Identify the fuzzy set $$A^{j_k}_i$$ for input $$x^k_i$$ that maximizes membership function
- Identify the fuzzy set $$B^{j_k}$$ for output $$y^k$$ that maximizes membership function
- Fuzzy rule
- IF $$x_1$$ is $$A_1^{j_k}$$ and ... and $$x_n$$ is $$A_n^{j_k}$$ THEN $$y$$ is $$B^{j_k}$$
- Degree of reliability
- $$D(k) = \left{\prod^n{i=1}\mu{A_i^{j_k}}(x_i^k)\right} \mu_B^{j_k}(y^k)$$
- Remove conflicting rules & generate rule base
- Choose the maximum $$D(k)$$
Lookup Table
Problems
- For 10 rules
- 9 are consistent with reasonable reliabilities
- 1 is inconsistent with the 9, but has higher reliability
- This one may be generated by bad data, but would be retained
Clustering
- Number of rules in a fuzzy system
- Too many rules
- Unnecessary complexity
- Reduced power of generalization
- Too few rules
- Insufficient to achieve the desired objective
- Too many rules
- Solutions
- Fix the number of rules before gradient descent training
- Fix the input fuzzy sets in the table look-up scheme
- Set the number of rules a parameter
- Partition the input-output data into clusters of disjoint subsets
- Cluster of points represents a single rule
- Number of rules = number of clusters
Nearest Neighborhood Clustering Procedure
- Start with the first input-output pair $$(x^1, y^1)$$, establish a cluster center at $$c^1 = x^1$$
- Count of number of data points in cluster: $$b^1 = 1$$
- Sum of all outputs in cluster: $$a^1 = y^1$$
- For the k-th pair $$(x^k, y^k)$$, compute the distance of $$x^k$$ to each $$M$$ existing centers of clusters
- $$d^k = |x^k - c^{j_k}|$$
- If $$d^k \le r$$
- Add the point to cluster at $$c^{j_k}$$
- $$a^{j_k} += y^k$$
- $$b^{j_k} += 1$$
- Else
- $$M += 1$$
- Establish a new cluster at $$c^M = x^k$$
- $$a^M = y^k$$
- $$b^M = 1$$
- Repeat until points exhausted
- Construct fuzzy system based on the singleton fuzzifier, the product inference engine, and center-average defuzzification
- $$A^k$$: Gaussian membership function centered at $$c^k$$ with spread $$\sigma$$
- $$\sigma$$ chosen to compromise between the matching accuracy & generalizing power of the fuzzy system
- $$B^k$$: fuzzy set centered at $$\frac{a^k}{b^k}$$
- Rule base of $$M$$ rules
- IF $$x$$ is $$A^k$$ THEN $$y$$ is $$B^k$$
- Mapping
- $$\frac{\sum \frac{a^k}{b^k} e^{-(\frac{x-c^k}{\sigma}})^2}{e^{-(\frac{x-c^k}{\sigma}})^2}$$
- If k-th rule given weighting factor of $$b^k$$:
- $$\frac{\sum^M{k=1} a^k e^{-(\frac{x-c^k}{\sigma}})^2}{\sum^M{k=1} b^k e^{-(\frac{x-c^k}{\sigma}})^2}$$
- $$A^k$$: Gaussian membership function centered at $$c^k$$ with spread $$\sigma$$
Heuristic Reasoning and "Trial & Error"
- Choose state & control variables
- Define domains & fuzzy sets for them
- Derive fuzzy IF-THEN rules
- Relates the state & control variables using engineering heuristics e.g. verbalization of human expertise
- Simulate & fine-tune by trial & error