Fuzzy Logic Toolbox | ![]() ![]() |
Generate an FIS structure from data using subtractive clustering.
Syntax
fismat = genfis2(Xin,Xout,radii) fismat = genfis2(Xin,Xout,radii,xBounds) fismat = genfis2(Xin,Xout,radii,xBounds,options)
Description
Given separate sets of input and output data, genfis2 generates an FIS using fuzzy subtractive clustering. When there is only one output, genfis2 may be used to generate an initial FIS for anfis
training by first implementing subtractive clustering on the data. genfis2 accomplishes this by extracting a set of rules that models the data behavior. The rule extraction method first uses the subclust
function to determine the number of rules and antecedent membership functions and then uses linear least squares estimation to determine each rule's consequent equations. This function returns an FIS structure that contains a set of fuzzy rules to cover the feature space.
The arguments for genfis2
are as follows:
Xin
is a matrix in which each row contains the input values of a data point.
Xout
is a matrix in which each row contains the output values of a data point.
radii
is a vector that specifies a cluster center's range of influence in each of the data dimensions, assuming the data falls within a unit hyperbox. For example, if the data dimension is 3 (e.g., Xin
has two columns and Xout
has one column), radii
= [0.5 0.4 0.3] specifies that the ranges of influence in the first, second, and third data dimensions (i.e., the first column of Xin
, the second column of Xin
, and the column of Xout
) are 0.5, 0.4, and 0.3 times the width of the data space, respectively. If radii
is a scalar, then the scalar value is applied to all data dimensions, i.e., each cluster center will have a spherical neighborhood of influence with the given radius.
xBounds
is a 2-by-N optional matrix that specifies how to map the data in Xin
and Xout
into a unit hyperbox, where N is the data (row) dimension. The first row of xBounds
contains the minimum axis range values and the second row contains the maximum axis range values for scaling the data in each dimension. For example, xBounds
= [-10 0 -1; 10 50 1] specifies that data values in the first data dimension are to be scaled from the range [-10 +10] into values in the range [0 1]; data values in the second data dimension are to be scaled from the range [0 50]; and data values in the third data dimension are to be scaled from the range [-1 +1]. If xBounds
is an empty matrix or not provided, then xBounds
defaults to the minimum and maximum data values found in each data dimension.
options
is an optional vector for specifying algorithm parameters to override the default values. These parameters are explained in the help text for subclust
. Default values are in place when this argument is not specified.
Examples
This is the minimum number of arguments needed to use this function. Here a range of influence of 0.5 is specified for all data dimensions.
This assumes the combined data dimension is 3. Suppose Xin
has two columns and Xout
has one column, then 0.5 and 0.25 are the ranges of influence for each of the Xin
data dimensions, and 0.3 is the range of influence for the Xout
data dimension.
This specifies how to normalize the data in Xin
and Xout
into values in the range [0 1] for processing. Suppose Xin
has two columns and Xout
has one column, then the data in the first column of Xin
are scaled from [-10 +10], the data in the second column of Xin
are scaled from [-5 +5], and the data in Xout
are scaled from [0 20].
See Also
![]() | genfis1 | gensurf | ![]() |