Main Content

RuleSettings

Tunable parameter settings of fuzzy rules

Description

A RuleSettings object is created using the getTunableSettings function with a mamfis, sugfis, or fistree object. When the third output is specified, getTunableSettings returns tunable parameter settings of fuzzy rules. Specify the settings of the Antecedent and Consequent properties.

Creation

Create a RuleSettings object using getTunableSettings with three outputs.

Properties

expand all

This property is read-only.

Name of fuzzy inference system, specified as a string.

This property is read-only.

Index of rule in fuzzy inference system, specified as an integer.

Antecedent parameter settings of rule, specified as a ClauseParameters object. Each antecedent parameter consists of the properties AllowNot, AllowEmpty, and Free. You can specify these properties.

Consequent parameter settings of rule, specified as a ClauseParameters object. Each consequent parameter consists of the properties AllowNot, AllowEmpty, and Free. You can specify these properties.

Object Functions

setTunableSet specified parameter settings as tunable or nontunable

Examples

collapse all

Create a fuzzy inference system.

fis = mamfis("Name","fis1","NumInputs",2,"NumOutputs",1);

Obtain rule parameter settings from the FIS.

[~,~,rule] = getTunableSettings(fis);

Each rule parameter setting includes the FIS name, the index of the rule in the FIS, and parameter settings for the rule antecedent and consequent (the rule clauses). For each clause, you can specify the tunability settings.

View the default tunable settings for the antecedent of the first rule.

rule(1).Antecedent(1)
ans = 
  ClauseParameters with properties:

      AllowNot: [0 0]
    AllowEmpty: [1 1]
          Free: [1 1]

You can use dot notation to specify the tunable settings for each rule.

Allow NOT logic in the antecedent of rule 1.

rule(1).Antecedent.AllowNot = true;

Make the consequent of rule 2 not available for tuning.

rule(2).Consequent.Free = 0;

Do not allow absence of a variable in the consequent of rule 3.

rule(3).Consequent.AllowEmpty = false;

Version History

Introduced in R2019a