# 129. C++ Neural Networks and Fuzzy Logic by Valluru B. Rao M&T Books, IDG Books Worldwide, Inc. ISBN: 1558515526   Pub Date: 06/01/95

#### Fuzzy Mean and Fuzzy Variance

Our next step is to calculate the fuzzy mean of the takeover price. Let us call it A_fuzzy_mean, to make reference to the fuzzy event used.

The calculation is as follows:

`      A_fuzzy_mean = (1/0.81) x (100 x 0.7 x 0.3 + 85 x 1 x 0.5 + 60 x 0.5 x 0.2) = 85.8 `

To get the fuzzy variance of the takeover price, you need to use values like (100-85.8)2 , which is the square of the deviation of the takeover price 100 from the fuzzy mean. A simpler way to calculate, which is mathematically equivalent, is to first take the fuzzy expected value of the square of the takeover price and then to subtract the square of the fuzzy mean. To make it easier, let us use p as the variable that represents the takeover price.

The calculations are as below:

`      A_fuzzy_expected p2 = 1/(0.81) x (1002x 0.7 x 0.3 + 852x 1 x 0.5 + 602x                            0.5 x 0.2) = 7496.91      A_fuzzy_variance = 7496.91 - 85.82 = 7496.91 - 7361.64 = 135.27 `

Fuzzy logic is thus introduced into the realm of probability concepts such as events, and statistical concepts such as mean and variance. Further, you can talk of fuzzy conditional expectations and fuzzy posterior probabilities, etc. enabling you to use fuzziness in Bayesian concepts, regression analysis, and so on. You will then be delving into the field of fuzzy quantification theories. In what follows, we continue our discussion with fuzzy conditional expectations.

#### Conditional Probability of a Fuzzy Event

Suppose you, as a shareholder of the XYZ company in the previous example come up with the fuzzy set, we will call the fuzzy event:

`      B = {0.8/100, 0.4/85, 0.7/60} `

The probability for your fuzzy event is as follows:

`      0.8 x 0.3 + 0.4 x 0.5 + 0.7 x 0.2 = 0.58 `

B_fuzzy_mean and B_fuzzy_variance of the takeover price of XYZ stock work out as 85.17 and 244.35, respectively. But you want to see how these values change if at all when you take A, the analyst’s fuzzy event, as a given. You are then asking to determine the conditional probability of your fuzzy event, and your conditional fuzzy mean and fuzzy variance as well.

The conditional probability of your fuzzy event is calculated as follows:

`      (1/0.81) x (0.8 x 0.7 x 0.3 + 0.4 x 1 x 0.5 + 0.7 x 0.5 x 0.2) = 0.54 `

This value is smaller than the probability you got before when you did not take the analyst’s fuzzy event as given. The a priori probability of fuzzy event B is 0.58, while the a posteriori probability of fuzzy event B given the fuzzy event A is 0.54.

#### Conditional Fuzzy Mean and Fuzzy Variance

The conditional B_fuzzy_mean of the takeover price with fuzzy event A as given works out as:

`      (1/0.54) x (100 x 0.8 x 0.7 x 0.3 + 85 x 0.4 x 1 x 0.5 + 60 x 0.7 x 0.5 x 0.2) = 70.37 `

and the conditional B_fuzzy_variance of the takeover price with fuzzy event A, as given, amounts to 1301.76, which is over five times as large as when you did not take the analyst’s fuzzy event as given.

### Linear Regression a la Possibilities

When you see the definitions of fuzzy means and fuzzy variances, you may think that regression analysis can also be dealt with in the realm of fuzzy logic. In this section we discuss what approach is being taken in this regard.

First, recall what regression analysis usually means. You have a set of x- values and a corresponding set of y values, constituting a number of sample observations on variables X and Y. In determining a linear regression of Y on X, you are taking Y as the dependent variable, and X as the independent variable, and the linear regression of Y on X is a linear equation expressing Y in terms of X. This equation gives you the line ‘closest’ to the sample points (the scatter diagram) in some sense. You determine the coefficients in the equation as those values that minimize the sum of squares of deviations of the actual y values from the y values from the line. Once the coefficients are determined, you can use the equation to estimate the value of Y for any given value of X. People use regression equations for forecasting.

Sometimes you want to consider more than one independent variable, because you feel that there are more than one variable which collectively can explain the variations in the value of the dependent variable. This is your multiple regression model. Choosing your independent variables is where you show your modeling expertise when you want to explain what happens to Y, as X varies.

In any case, you realize that it is an optimization problem as well, since the minimization of the sum of squares of deviations is involved. Calculus is used to do this for Linear Regression. Use of calculus methods requires certain continuity properties. When such properties are not present, then some other method has to be used for the optimization problem.

The problem can be formulated as a linear programming problem, and techniques for solving linear programming problems can be used. You take this route for solving a linear regression problem with fuzzy logic.

In a previous section, you learned about possibility distributions. The linear regression problem with fuzzy logic is referred to as a linear possibility regression problem. The model, following the description of it by Tarano, Asai, and Sugeno, depends upon a reference function L, and fuzzy numbers in the form of ordered pairs (a, b). We will present fuzzy numbers in the next section and then return to continue our discussion of the linear possibility regression model. C++ Neural Networks and Fuzzy Logic
ISBN: 1558515526
EAN: 2147483647
Year: 1995
Pages: 139

Similar book on Amazon