convertToType2
Convert type-1 fuzzy inference system into type-2 fuzzy inference system
Description
Examples
Convert Type-1 FIS to Type-2 FIS
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)
Create Type-2 Fuzzy Inference System from Data
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
Output Arguments
fisT2
— Type-2 fuzzy inference system
mamfistype2
object | sugfistype2
object
Type-2 fuzzy inference system, returned as one of the following:
mamfistype2
object whenfisT1
is amamfis
objectsugfistype2
object whenfisT1
is asugfis
object
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.
Version History
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)