convertToType2

Convert type-1 fuzzy inference system into type-2 fuzzy inference system

Description

example

fisT2 = convertToType2(fisT1) converts the type-1 fuzzy inference system fisT1 into a type-2 fuzzy inference system fisT2.

Examples

collapse all

Create a type-1 fuzzy inference system. For this example, load the tipper.fis file.

fisT1 = readfis('tipper');

View the membership function for the first input variable.

plotmf(fisT1,"input",1)

Convert fisT1 into a type-2 fuzzy inference system.

fisT2 = convertToType2(fisT1);

View the converted membership functions for the first input variable.

plotmf(fisT2,"input",1)

To create a type-2 FIS from input/output data, you must first create a type-1 FIS using genfis.

Load training data and generate a FIS using subtractive clustering.

load clusterdemo.dat
inputData = clusterdemo(:,1:2);
outputData = clusterdemo(:,3);
opt = genfisOptions('SubtractiveClustering',...
                    'ClusterInfluenceRange',[0.5 0.25 0.3]);
fisT1 = genfis(inputData,outputData,opt);
fisT1.Outputs
ans = 
  fisvar with properties:

                   Name: "out1"
                  Range: [-0.1274 1.1458]
    MembershipFunctions: [1x3 fismf]

Convert the generated FIS to a type-2 FIS.

fisT2 = convertToType2(fisT1);

Since the initial type-1 FIS is a Sugeno system, only the input MFs are converted to type-2 MFs.

Input Arguments

collapse all

Type-1 fuzzy inference system, specified as a mamfis or sugfis object.

Output Arguments

collapse all

Type-2 fuzzy inference system, returned as one of the following:

The properties of fisT2 match the corresponding properties of fisT1, except that each type-1 membership function (except for Sugeno output membership functions) is converted to a type-2 membership function. The upper membership function parameters of each type-2 membership function in fisT2 match the membership function parameters of the corresponding type-1 membership function in fisT1.

fisT2 has default LowerScale and LowerLag values and uses the default "karnikmendel" type reduction method.

Introduced in R2019b