genfisOptions
Option set for genfis
function
Description
returns an options object for generating a fuzzy inference system using opt
= genfisOptions(clusteringType
)genfis
. The options object contains different options that depend on
the specified clustering algorithm, clusteringType
. To specify
nondefault options, use dot notation.
specifies options using one or more name-value arguments.opt
= genfisOptions(clusteringType
,Name=Value
)
Examples
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);
Input Arguments
Clustering method for defining membership functions and fuzzy rules, specified as one of these values:
"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, seesubclust
."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, seefcm
.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: opt =
genfis("GridPartition",NumMembershipFunctions=3)
Grid Partitioning Options
Number of input membership functions for each input variable, specified as one of the following values.
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.
Input membership function type, specified as one of the following values.
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
"dsigmf"
Difference between two sigmoidal membership functions dsigmf
"psigmf"
Product of two sigmoidal membership functions psigmf
"pimf"
Pi-shaped membership function pimf
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"]
Output membership function type for a single-output Sugeno system, specified as one of the following values.
"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.
Subtractive Clustering Options
Range of influence of the cluster center for each input and output assuming the data falls within a unit hyperbox, specified as one of the following values.
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.
Data scale factors for normalizing input and output data into a unit hyperbox, specified as 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.
Squash factor for scaling the range of influence of cluster centers, specified as 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.
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 a
scalar value in the range [0
, 1
].
The acceptance ratio must be greater than the rejection ratio.
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 a
scalar value in the range [0
, 1
].
The rejection ratio must be less than acceptance ratio.
Information display flag indicating whether to display progress information during clustering, specified as one of the following values.
false
— Do not display progress information.true
— Display progress information.
Custom cluster centers, specified as a C-by-N array, where C is the number of clusters and N is the total number of inputs and outputs.
FCM Clustering Options
Fuzzy inference system type, specified as one of the following values.
"sugeno"
— Sugeno-type fuzzy system"mamdani"
— Mamdani-type fuzzy system
For more information on the types of fuzzy inference systems, see Mamdani and Sugeno Fuzzy Inference Systems.
Number of clusters to create, specified as "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 for the fuzzy partition matrix, specified as 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.
Maximum number of iterations, specified as a positive integer.
Minimum improvement in objective function between two consecutive iterations, specified as a
positive scalar. When the objective function improves by an amount less than
MinImprovement
the FCM algorithm stops.
Since R2023a
Method for computing distance between data points and cluster centers, specified as one of the following values.
"euclidean"
— Compute distance using a Euclidean distance metric, which corresponds to the classical FCM algorithm."mahalanobis"
— Compute distance using a Mahalanobis distance metric, which corresponds to the Gustafson-Kessel FCM algorithm."fmle"
— Compute distance using fuzzy maximum likelihood estimation (FMLE), which corresponds to the Gath-Geva FCM algorithm. (since R2023b)
Since R2023b
Initial cluster centers, specified as a Nc-by-Nf matrix, where Nc is the number of clusters and Nf is the number of data features.
When ClusterCenters
is empty, the FCM algorithm randomly initializes the cluster center values.
Information display flag indicating whether to display the objective function value after each iteration, specified as one of the following values.
true
— Display objective function.false
— Do not display objective function.
Output Arguments
Options for genfis
function, returned as one of the
following objects.
GridPartitionOptions
— WhenclusteringType
is"GridPartition"
SubtractiveClusteringOptions
— WhenclusteringType
is"SubtractiveClustering"
FCMClusteringOptions
— WhenclusteringType
is"FCMClustering"
Version History
Introduced in R2017aWhen creating a FIS from data using FCM clustering, you can now specify initial
estimates of the cluster centers. Previously, the genfis
function randomly initialized the cluster centers.
To specify cluster centers, set the ClusterCenters
option.
When creating a FIS from data using FCM clustering, you can now use the Gath-Geva FCM algorithm, which uses a distance metric based on fuzzy maximum-likelihood estimation.
To specify the FCM distance metric, use the DistanceMetric
option.
When creating a FIS from data using FCM clustering, you can now use the Gustafson-Kessel FCM algorithm, which uses a Mahalanobis distance metric. Previously, you could use only a Euclidean distance metric.
To specify the FCM distance metric, use the DistanceMetric
option.
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)