Learn R Programming

FisPro (version 1.1.4)

Rule: Class "Rule"

Description

Class to manage a Fis rule

Arguments

Fields

premises

integer vector, The premises of the rule
A premise is the 1-based index of MF in the FisIn
0 means the input is not taken into account for this rule, i.e. the rule is incomplete
The vector length must be equal to the number of inputs in the Fis

conclusions

numeric vector, The conclusions of the rule
A conclusion is a numeric value for crisp output FisOutCrisp, or the 1-based index of MF in the fuzzy output FisOutFuzzy
The vector length must be equal to the number of outputs in the Fis

Constructors

Rule()

The default constructor to build an empty rule
The rule is initialized with empty premises and conclusions

return:

Rule object

Rule(premises, conclusions)

The constructor to build a rule

argument: premises

integer vector, The premises of the rule (the vector length must be equal to the number of inputs in the Fis)

argument: conclusions

numeric vector, The conclusions of the rule (the vector length must be equal to the number of outputs in the Fis)

return:

Rule object

See Also

Examples

Run this code
rule1 <- NewRule()
rule1$premises <- c(1, 2, 0)
rule1$conclusions <- c(1, 2)

rule2 <- NewRule(c(2, 1, 1), c(2, 1))

Run the code above in your browser using DataLab