Main Content

genfisOptions

Option set for genfis function

Description

opt = genfisOptions(clusteringType) creates a default options object for generating a fuzzy inference system using genfis. The options object, 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.

example

opt = genfisOptions(clusteringType,Name=Value) creates an option set with options specified by one or more name-value arguments.

example

Examples

collapse all

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

collapse all

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.

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.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: opt = genfis("GridPartition",NumMembershipFunctions=3)

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Example: opt = genfis("GridPartition","NumMembershipFunctions",3)

Grid Partitioning Options

collapse all

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 typeDescriptionFor more information
    "gbellmf"Generalized bell-shaped membership functiongbellmf
    "gaussmf"Gaussian membership functiongaussmf
    "gauss2mf"Gaussian combination membership functiongauss2mf
    "trimf"Triangular membership functiontrimf
    "trapmf"Trapezoidal membership functiontrapmf
    "dsigmf"Difference between two sigmoidal membership functionsdsigmf
    "psigmf"Product of two sigmoidal membership functionspsigmf
    "pimf"Pi-shaped membership functionpimf
  • 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

collapse all

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

collapse all

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.

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 an C-by-N matrix, where C is the number of clusters and N 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

collapse all

Options for genfis function, returned as one of the following objects.

  • GridPartitionOptions — When clusteringType is "GridPartition"

  • SubtractiveClusteringOptions — When clusteringType is "SubtractiveClustering"

  • FCMClusteringOptions — When clusteringType is "FCMClustering"

Version History

Introduced in R2017a

expand all

See Also

| |