Legacy Documentation

Fuzzy Logic (2004)

This is documentation for an obsolete product.
Current products and services

 Documentation /  Fuzzy Logic /  Manual /

Fuzzy Relation VisualizationFuzzy Inferencing

1.7 Compositions

1.7.1 Introduction

Fuzzy Logic provides a few different ways to perform compositions between two fuzzy relations. In this chapter, we introduce and demonstrate these functions and the options associated with them.

This loads the package.

In[1]:=

1.7.2 Composition Function

To demonstrate the various composition functions, we must first create some fuzzy relations. We use the FuzzyTrapezoid function here to create two fuzzy relations. We must be careful to create two fuzzy relations that can be combined by a composition operation. To take the composition of two fuzzy relations, the second range of the first fuzzy relation's universal space must be the same as the first range in the second fuzzy relation's universal space. This is a necessary condition to perform a composition of two fuzzy relations.

In[2]:=

In[3]:=

We can view the two fuzzy relations we created using one of Fuzzy Logic's plotting functions. Here we use the FuzzySurfacePlot function to look at the fuzzy relations.

In[4]:=

In[5]:=

Function Composition.

Composition[A, B, opts] returns a fuzzy relation that is the result of performing a composition between fuzzy relations A and B. There is a Type option with this function that defaults to a MaxMin composition. Other types available are MaxProduct and MaxStar[func], which allows you to define your own function for combining the relations.

Option for the fuzzy set Composition.

The MaxMin composition performs an operation similar to matrix multiplication. The membership grades of the new fuzzy relation created by this operation are found by combining the membership grades from each row of the first fuzzy relation with the membership grades of each column of the second fuzzy relation. In the MaxMin composition, the membership grades are combined by finding the maximum of the minimums of the corresponding membership grades in the rows of the first fuzzy relation and the columns of the second fuzzy relation. Let's see how this function performs.

In[6]:=

In[7]:=

In the MaxProduct composition, the membership grades are found by taking the maximum of the products of corresponding membership grades in the rows of the first fuzzy relation and the columns of the second fuzzy relation. Let's see how this function behaves.

In[8]:=

In[9]:=

For the MaxStar composition, the membership grades are found by taking the maximum of the result of applying a user-defined function to corresponding membership grades in the rows of the first fuzzy relation and the columns of the second fuzzy relation. Let's see how to use this function.

First we create a function of our own for combining membership grades. We create a function that combines membership grades by taking half of the Min of the membership grades.

In[10]:=

Now we call the Composition function with Type set to MaxStar with our function, MyFun, as a parameter.

In[11]:=

In[12]:=

Fuzzy Relation VisualizationFuzzy Inferencing