Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

**MathWorks Machine Translation**

The automated translation of this page is provided by a general purpose third party translator tool.

MathWorks does not warrant, and disclaims all liability for, the accuracy, suitability, or fitness for purpose of the translation.

Option set for `genfis`

command

`opt = genfisOptions(clusteringType)`

`opt = genfisOptions(clusteringType,Name,Value)`

creates
a default option set for generating a fuzzy inference system structure
using `opt`

= genfisOptions(`clusteringType`

)`genfis`

. The option set, `opt`

,
contains different options that depend on the specified clustering
algorithm, `clusteringType`

. Use dot notation to
modify this option set for your specific application. Options that
you do not modify retain their default values.

creates
an option set with options specified by one or more `opt`

= genfisOptions(`clusteringType`

,`Name,Value`

)`Name,Value`

pair
arguments.

Create a default option set for the grid partitioning generation method.

`opt = genfisOptions('GridPartition');`

Modify the options using dot notation. For example, specify `3`

membership functions for the first input and `4`

membership functions for the second input.

opt.NumMembershipFunctions = [3 4];

You can also specify options when creating the option set. For example, create an option set for FCM clustering using `4`

clusters.

opt2 = genfisOptions('FCMClustering','NumClusters',4);

`clusteringType`

— Clustering method`'GridPartition'`

| `'SubtractiveClustering'`

| `'FCMClustering'`

Clustering method for defining membership functions and fuzzy rules, specified as one of the following:

`'GridPartition'`

— Generate input membership functions by uniformly partitioning the input variable ranges, and create a single-output Sugeno fuzzy system. The fuzzy rule base contains one rule for each input membership function combination.`'SubtractiveClustering'`

— Generate a Sugeno fuzzy system using membership functions and rules derived from data clusters found using subtractive clustering of input and output data. For more information on subtractive clustering, see`subclust`

.`'FCMClustering'`

— Generate a fuzzy system using membership function and rules derived from data clusters found using FCM clustering of input and output data. For more information on FCM clustering, see`fcm`

.

Specify optional
comma-separated pairs of `Name,Value`

arguments. `Name`

is
the argument name and `Value`

is the corresponding value.
`Name`

must appear inside quotes. You can specify several name and value
pair arguments in any order as `Name1,Value1,...,NameN,ValueN`

.

`'InputMembershipFunctionType','trimf'`

sets
triangular input membership functions for the grid partitioning algorithm.`'NumMembershipFunctions'`

— Number of input membership functions`2`

(default) | integer greater than 1 | vector of integers greater than 1Number of input membership functions for each input variable,
specified as the comma-separated pair consisting of `'NumMembershipFunctions'`

and
one of the following:

Integer greater than 1 — Specify the same number of membership functions for all inputs.

Vector of integer greater than 1 with length equal to the number of inputs — Specify a different number of membership functions for each input.

`'InputMembershipFunctionType'`

— Input membership function type`'gbellmf'`

(default) | `'gaussmf'`

| `'trimf'`

| `'trapmf'`

| character vector | string array | ...Input membership function type, specified as the comma-separated
pair consisting of `'InputMembershipFunctionType'`

and
one of the following:

Character vector or string — Specify one of the following membership function types for all inputs.

Membership function type Description For more information `'gbellmf'`

Generalized bell-shaped membership function `gbellmf`

`'gaussmf'`

Gaussian membership function `gaussmf`

`'gauss2mf'`

Gaussian combination membership function `gauss2mf`

`'trimf'`

Triangular membership function `trimf`

`'trapmf'`

Trapezoidal membership function `trapmf`

`'sigmf'`

Sigmoidal membership function `sigmf`

`'dsigmf'`

Difference between two sigmoidal membership functions `dsigmf`

`'psigmf'`

Product of two sigmoidal membership functions `psigmf`

`'zmf'`

Z-shaped membership function `zmf`

`'pimf'`

Pi-shaped membership function `pimf`

`'smf'`

S-shaped membership function `smf`

Character vector or string Name of a custom membership function in the current working folder or on the MATLAB ^{®}pathBuild Fuzzy Systems Using Custom Functions Character array or string array — Specify a different membership function type for each input. For example, specify different membership functions for a three-input system:

["gbellmf","gaussmf","trimf"]

`'OutputMembershipFunctionType'`

— Output membership function type`'linear'`

(default) | `'constant'`

Output membership function type for a single-output Sugeno system,
specified as the comma-separated pair consisting of `'OutputMembershipFunctionType'`

and
one of the following:

`'linear'`

— The output of each rule is a linear function of the input variables, scaled by the antecedent result value.`'constant'`

— The output of each rule is a constant, scaled by the antecedent result value.

`'ClusterInfluenceRange'`

— Range of influence of the cluster center`0.5`

(default) | scalar value in the range [`0`

, `1`

] | vectorRange of influence of the cluster center for each input and
output assuming the data falls within a unit hyperbox, specified as
the comma-separated pair consisting of `'ClusterInfluenceRange'`

one
of the following:

Scalar value in the range [

`0`

`1`

] — Use the same influence range for all inputs and outputs.Vector — Use different influence ranges for each input and output.

Specifying a smaller range of influence usually creates more and smaller data clusters, producing more fuzzy rules.

`'DataScale'`

— Data scale factors`'auto'`

(default) | 2-by-Data scale factors for normalizing input and output data into
a unit hyperbox, specified as the comma-separated pair consisting
of `'DataScale'`

and a 2-by-*N* array,
where *N* is the total number of inputs and outputs.
Each column of `DataScale`

specifies the minimum
value in the first row and the maximum value in the second row for
the corresponding input or output data set.

When `DataScale`

is `'auto'`

,
the `genfis`

command uses the actual minimum and
maximum values in the data to be clustered.

`'SquashFactor'`

— Squash factor`1.25`

(default) | positive scalarSquash factor for scaling the range of influence of cluster
centers, specified as the comma-separated pair consisting of `'SquashFactor'`

and
a positive scalar. A smaller squash factor reduces the potential for
outlying points to be considered as part of a cluster, which usually
creates more and smaller data clusters.

`'AcceptRatio'`

— Acceptance ratio`0.5`

(default) | scalar value in the range [`0`

, `1`

]Acceptance ratio, defined as a fraction of the potential of
the first cluster center, above which another data point is accepted
as a cluster center, specified as the comma-separated pair consisting
of `'AcceptRatio'`

and a scalar value in the range
[`0`

, `1`

]. The acceptance ratio
must be greater than the rejection ratio.

`'RejectRatio'`

— Rejection ratio`0.15`

(default) | scalar value in the range [`0`

, `1`

]Rejection ratio, defined as a fraction of the potential of the
first cluster center, below which another data point is rejected as
a cluster center, specified as the comma-separated pair consisting
of `'RejectRatio'`

and a scalar value in the range
[`0`

, `1`

]. The rejection ratio
must be less than acceptance ratio.

`'Verbose'`

— Information display flag`false`

(default) | `true`

Information display flag indicating whether to display progress
information during clustering, specified as the comma-separated pair
consisting of `'Verbose'`

and one of the following:

`false`

— Do not display progress information.`true`

— Display progress information.

`'CustomClusterCenters'`

— Custom cluster centers`[]`

(default) | Custom cluster centers, specified the comma-separated pair consisting
of `'CustomClusterCenters'`

and as a *C*-by-*N* array,
where *C* is the number of clusters and *N* is
the total number of inputs and outputs.

`'FISType'`

— Fuzzy inference system type`'sugeno'`

(default) | `'mamdani'`

Fuzzy inference system type, specified as the comma-separated
pair consisting of `'FISType'`

and one of the following:

`'sugeno'`

— Sugeno-type fuzzy system`'mamdani'`

— Mamdani-type fuzzy system

For more information on the types of fuzzy inference systems, see Types of Fuzzy Inference Systems.

`'NumClusters'`

— Number of clusters`'auto'`

| integer greater than `1`

Number of clusters to create, specified as the comma-separated
pair consisting of `'NumClusters'`

and `'auto'`

or
an integer greater than `1`

. When `NumClusters`

is `'auto'`

,
the `genfis`

command estimates the number of clusters
using subtractive clustering with a cluster influence range of `0.5`

.

`NumClusters`

determines the number of rules
and membership functions in the generated FIS.

`'Exponent'`

— Exponent for the fuzzy partition matrix`2.0`

(default) | scalar greater than `1.0`

Exponent for the fuzzy partition matrix, specified as the comma-separated
pair consisting of `'Exponent'`

and a scalar greater
than `1.0`

. This option controls the amount of fuzzy
overlap between clusters, with larger values indicating a greater
degree of overlap.

If your data set is wide with significant overlap between potential clusters, then the calculated cluster centers can be very close to each other. In this case, each data point has approximately the same degree of membership in all clusters. To improve your clustering results, decrease this value, which limits the amount of fuzzy overlap during clustering.

For an example of fuzzy overlap adjustment, see Adjust Fuzzy Overlap in Fuzzy C-Means Clustering.

`'MaxNumIteration'`

— Maximum number of iterations`100`

(default) | positive integerMaximum number of iterations, specified as the comma-separated
pair consisting of `'MaxNumIteration'`

and a positive
integer.

`'MinImprovement'`

— Minimum improvement in objective function`1e-5`

(default) | positive scalarMinimum improvement in objective function between two consecutive
iterations, specified as the comma-separated pair consisting of `'MinImprovement'`

and
a positive scalar.

`'Verbose'`

— Information display flag`true`

(default) | `false`

Information display flag indicating whether to display the objective
function value after each iteration, specified as the comma-separated
pair consisting of `'Verbose'`

and one of the following:

`true`

— Display objective function.`false`

— Do not display objective function.

`opt`

— Option set for `genfis`

command`genfisOptions`

option setOption set for `genfis`

command, returned
as a `genfisOptions`

option set. The options in
the option set depend on the specified `clusteringType`

.

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.

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: .

Select web siteYou can also select a web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

- América Latina (Español)
- Canada (English)
- United States (English)

- 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)