3.1. Fuzzy Rule-Based Neural Network [33]
Fuzzy system is a rule set with a premise (input) that is composed of several linguistic variables and a conclusion (output) that is also composed of several linguistic variables.
Herein, we consider a fuzzy system with e.g., m-input 1-output.
Rj: IF x1 is A1 AND x2 is A2 AND, …, AND xn is An, THEN y is B. Where j is rule number index, n is the inputs numbers, A1–An denotes the fuzzy sets over the universe of X, B denotes the fuzzy set over the universe of Y.
We assume the fuzzy rule set above has r fuzzy rules. Each relation in the fuzzy rule set has several fuzzy input variables (x1, x2, …, xn) and one fuzzy output variable. As n increases, each fuzzy rule becomes more and more complex. The relation within a given rule is expressed as “sequential relation among fuzzy sets” in the rule.
For fuzzy variables whose membership function are continuous, the first step is to transfer it into discrete counterparts. For example, if we are given a simple rule: IF A, THEN B. We first divide A and B into a same number of counterparts, for example, three counterparts: {(a1, μA(a1)), (a2, μA(a2)), (a3, μA(a3))} and {(b1, μB(b1)), (b2, μB(b2)), (b3, μB(b3))}. The inner relation Rinner should be expressed as {(μA(a1), μB(b1)), (μA(a2), μB(b2)), (μA(a3), μB(b3))}. More often the premise of a fuzzy rule has more than one fuzzy input variables, corresponding, Rinner could be expressed as {(μA1(a11), μA2(a21), μA3(a31), …, μB(b1)), (μA1(a12), μA2(a22), μA3(a32), …, μB(b2)), …}.
Except for the ordered pairs, a relation can be defined by a formula or an algorithm that tells how to calculate the output given a set of inputs, as well as ANNs. Sometimes, we cannot get all the ordered pairs such as continuous relation or know a formula for complex real world problems. As mentioned before, ANNs are very suitable for problems whose solutions require underlying predicting rules that are hard to specify. After learning of the training samples that are already known, ANNs have the ability to infer the unseen part (output) of a testing sample.
Since the sequential relation among fuzzy sets is not a direct relation among crisp numbers, now, we introduce the “fuzzy rule-based neural network” to express the fuzzy rule
Rj. The theoretical structure of the fuzzy rule-based neural network (shown in
Figure 2 [
33]) includes Input layer, Fuzzification layer, Neural training layer and Output layer. Since there are
r fuzzy rules in the fuzzy set, there are
r fuzzy neural network structures in
Figure 2 to match with. There may be many dashed parts, which correspond with the un-active fuzzy rules for the current training time.
Figure 2.
Fuzzy rule-based neural network.
Figure 2.
Fuzzy rule-based neural network.
Layer specification:
Input layer: only original (crisp) variables (x1–xn) are presented to this layer.
Fuzzification layer: This layer transfers the original variable values into fuzzy ones. One node of this layer mirrors one fuzzy set (Lowest, Lower, etc.) and the output link of the nodes represents the membership value, which specifies the degree of an input belongs to a fuzzy set. Then, this layer chooses the value with the maximum membership degree to participate the process of the neural training layer according to the maximum membership degree principal.
Neural training layer: This layer is the
n-inputs, 1-output feed forward neural network using the BP algorithm that is commonly used. The back propagation artificial neural network (BPANN) is basically a neural network, which composed of input layer, hidden layer and the output layer [
34]. Besides, it uses BP algorithm to train itself, taking inputs from the previous layer and sending outputs to the next layer. The BP algorithm determines the weights during the process of data training, resulting in a minimized error between the real and the expected values, which is used for updating the weights [
35,
36].
Output layer: This layer is the same to the output layer of ANNs but with a fuzzy number output.
3.2. Neural Fuzzy Inference System-Based Weather Prediction Model (NFIS-WPM)
Now we introduce the fuzzy inference system on the basis of fuzzy rule-based neural network to predict weather condition, that is, neural fuzzy inference system-based weather prediction model, NFIS-WPM for short.
3.2.1. Meteorological Fuzzy Inference System
Fuzzy inference system [
33] consists of a fuzzy system with known inputs and outputs that we call “fuzzy back knowledge”; an incomplete fuzzy system with known inputs and unknown outputs that we call a “fuzzy inference problem”.
Fuzzy inference system is suited to weather forecasting, whose process is expressed by the equation:
where
G(premise) contains
n forecasting premises to predict
C(
conclusion).
Take a simple example to show how it works on a weather system. There are five forecasting premises and one meteorological element (conclusion) in the fuzzy rule set
R:R(1): IF x1 is X11 and x2 is X21 and x3 is X31 and x4 is X41 and x5 is X51 THEN y is Y1;
R(2): IF x1 is X12 and x2 is X22 and x3 is X32 and x4 is X42 and x5 is X52 THEN y is Y2;
R(3): IF x1 is X13 and x2 is X23 and x3 is X33 and x4 is X43 and x5 is X53 THEN y is Y3;
R(4): IF x1 is X14 and x2 is X24 and x3 is X34 and x4 is X44 and x5 is X54 THEN y is Y4;
......
If we want to deduct another rule “R(5): IF x1 is X15 and x2 is X25 and x3 is X35 and x4 is X45 and x5 is X55THEN Y is?” according to the rules above. Such problems are called “meteorological fuzzy inference problem”. X11, X12, X13, X14, ..., are different fuzzy sets.
Figure 3.
Membership function curves of meteorological fuzzy variable premises.
Figure 3.
Membership function curves of meteorological fuzzy variable premises.
3.2.2. Meteorological Fuzzy Inference Algorithm
Meteorological fuzzy inference algorithm is the algorithm executed in the neural fuzzy inference system-based weather prediction model (NFIS-WPM)
Stage 1: In this stage, crisp numbers are mapped to corresponding fuzzy sets in accordance with the membership function curves shown in
Figure 3. Now we take
Figure 3a as an example to describe how we use the membership function curves to determine the corresponding fuzzy set of a crisp number. There are four membership function curves shown in this panel. Each curve is used to read the membership degrees corresponding to the atmospheric pressure values for one of the different fuzzy sets named “Lowest”, “Lower”, “Lower slightly” and “Moderate”, respectively. For example, given a crisp number “910” whose membership degree is “Moderate”, we can get the maximum membership degree value of the membership function curve for “Moderate” compared with the other three in
Figure 3a, and then we map the number “910” to fuzzy set “Moderate”. Similarly, the membership function curves shown in
Figure 3b–d are used to map crisp dry and wet bulb temperatures, humidity values and wind force values to corresponding fuzzy sets for temperature, humidity and wind. Thus, the training samples of ANNs are transferred into a fuzzy inference system.
Stage 2:/* suppose there are r fuzzy rules in the rule set with the same structure and n fuzzy variables (premises) in each rule.*/ |
PreCount[] = 0; // set PreCount[] to zero. |
for j = 1 to r
for i = 1 to n
if (Rnewi == Rji)
PreCount[j] ++ ;
end
end
if (PreCount[j] == n) // PreCount[j] == n when the jth fuzzy rule’s premises are the same to the new coming rule.
Rnew(n+1) = Rj(n+1)
end
end
Countj = 0
for k = 1 to r
if (PreCount[j] != 0)
Countj = 1;
break;
end
end
if (Countj == 0) // “Countj == 0” means the new coming rule is a new one.
complexinference(); // “complexinference()” is a function related to the complex fuzzy inference.
end
|
Stage 3: complexinference() specification
Complexinference() may contains more than one prediction model and ANN is used for simulating the process of fuzzy inference.
Void Complexinference() |
for j = 1 to r
/* Fuzzy rule-based neural network corresponding to Rj is used to get the membership function values of output of Rnew––Rnew(n+1), then the comparisonbetween the output and each fuzzy set of the restricted domain is made*/
if (the output is consistent with some fuzzy set of the restricted domain to a certain degree β or bigger than β)
output the fuzzy set
else
choose the fuzzy set with the most similarities
end
end
/* “restricted domain” refers to the range of the output we set in advance. If we hope to restrict the range of the output to {Higher, High, Lower, Low }, the restricted domain is {Higher, High, Lower, Low}. β is a threshold to control the similarity degree of the output and the element of the restricted domain.*/
|
In mathematics, a function is a relation between inputs and outputs with the property that each unique combination of inputs matches with exactly one output. An example is the function that relates each real number μA(x) to μB(x). In this example, if the inputs μA(3) = μA(4) and the output are 0.9 and 0.8, respectively, then we say the relation between μA(x) to μB(x) is not a function since the same input values lead to different output values. Similarly, our model is a relation between the fuzzy variable inputs and a set of fuzzy variable output. After completing the whole process, the same meteorological premises may lead to different meteorological conclusions.
To solve such problem, we introduce the concept of the expected value (Definition 3.1):
Definition 3.1 Let
X be a discrete random variable taking numerical values with distribution function
p(
x). The expected value
E(
X) is defined as:
The expected value is a weighted average of all possible values, each of which is multiplied by its assigned distribution function, and the final products are then added together to get the expected value. Obviously, the values used to calculate the expected value should be numerical, but our model’s value is a fuzzy set, in other words, linguistic. To solve this problem, we use a number to represent a linguistic variable value, for example, use “1” to replace “Little rain”. NFIS-WPM combing the method described above is called NFIS-WPM (Ave). We should notice that the hitting rate (Definition 3.2) in NFIS-WPM (Ave) would drop down sharply since the expected value is a compromise among the different possible outputs.
Definition 3.2 Let
Correctp be times of correct prediction and overall times of prediction as
Totalp. The hitting rate
Hitrate is defined as:
Under these circumstances, we adopt the policy of rounding up. For example, if “1” is to represent “Little rain” and “2” is to represent “Moderate rain” and there is a number “1.6”, so we give the prediction result as “Moderate rain”.
Or we just give the value with the highest possibility among all the generated values to the fuzzy variable. This is a more straight-forward method. Similarly, NFIS-WPM combing this method is called NFIS-WPM (Hig-prob).