tunefisOptions

Option set for tunefis function

Description

Use a tunefisOptions object to specify options for tuning fuzzy systems. Specify options such as the optimization method, optimization type, and distance metric for cost measurement. Then, use this object as an input for the tunefis function.

Creation

Description

example

opt = tunefisOptions creates a default option set for tuning a fuzzy system using tunefis. Use dot notation to modify the properties of this option set for your specific application.

example

opt = tunefisOptions(Name,Value) creates an option set with the specified Properties using one or more name-value pair arguments.

Properties

expand all

Tuning algorithm, specified as one of the following:

  • 'ga' — genetic algorithm

  • 'particleswarm' — particle swarm

  • 'patternsearch' — pattern search

  • 'simulannealbnd' — simulated annealing algorithm

  • 'anfis' — adaptive neuro-fuzzy

These tuning algorithms use solvers from the Global Optimization Toolbox, except for 'anfis'. The 'MethodOptions' property differs for each algorithm, and corresponds to the options input argument for the respective solver. If you specify MethodOptions without specifying algorithm name, then Method is determined based on MethodOptions.

The 'anfis' tuning method supports tuning only type-1 Sugeno fuzzy inference systems with one output variable.

Tuning algorithm options, specified as an option object for the specified tuning algorithm Method. This property differs for each algorithm and is created using optimoptions. If MethodOptions is not specified, it is created according to Method. Use dot notation to modify options in MethodOptions.

Type of optimization, specified as one of the following:

  • 'tuning'

  • 'learning'

When tuning is selected, the existing input, output, and rule parameters are optimized without learning new rules. When learning is selected, new rules are added based on NumMaxRules. The anfis algorithm supports only tuning.

Maximum number of rules in FIS after optimization, specified as an integer. The number of rules in a FIS (after optimization) may be less than NumMaxRules since duplicate rules with same antecedent values are removed from the rule base. Default value is inf, which indicates existing rules are used when OptimizationType is 'tuning' and maximum number of possible rules are used when OptimizationType is 'learning'. For a fistree object, NumMaxRules indicates that the number of rules in each FIS of a fistree is less than or equal to the specified value. anfis does not support rule parameter optimization.

Invalid parameter use, specified as either true or false. If true, the tunefis function ignores invalid parameter values generated in the tuning process. Default value is true. anfis ignores this parameter value.

Type of distance metric used for cost measurement of the optimized parameter values with respect to the training data, specified as 'rmse', 'norm1', or 'norm2'. anfis supports only 'rmse'.

Parallel computation, specified as either true or false. If true, tunefis function uses parallel computation in the optimization process. anfis does not support parallel optimization.

Examples

collapse all

Create a default option set using the particle swarm tuning algorithm.

opt = tunefisOptions("Method","particleswarm")
opt = 
  tunefisOptions with properties:

                     Method: "particleswarm"
              MethodOptions: [1x1 optim.options.Particleswarm]
           OptimizationType: "tuning"
                NumMaxRules: Inf
    IgnoreInvalidParameters: 1
             DistanceMetric: "rmse"
                UseParallel: 0

You can modify the options using dot notation. For example, set the maximum number of iterations to 20.

opt.MethodOptions.MaxIterations = 20;

You can also specify other options when creating the option set. In this example, set the OptimizationType to "learning" to learn new rules.

opt2 = tunefisOptions("Method","particleswarm","OptimizationType","learning")
opt2 = 
  tunefisOptions with properties:

                     Method: "particleswarm"
              MethodOptions: [1x1 optim.options.Particleswarm]
           OptimizationType: "learning"
                NumMaxRules: Inf
    IgnoreInvalidParameters: 1
             DistanceMetric: "rmse"
                UseParallel: 0

Introduced in R2019a