Learn R Programming

FuzzyToolkitUoN (version 1.0)

addRule: Inserts a rule

Description

Adds a rule to a FIS object.

Arguments

FIS
A FIS structure is to be provided.
inputRule
A vector of length m + n + 2, where m is the number of input variables of a FIS. Each column in 'm' has a number which refers to the membership function of that input variable. Columns under 'n' refer to an output variable of a FIS, where the value

Value

    Details

    For example, if one has a FIS with 2 input variables, and 1 output variable, each of which have 3 membership functions (the amount of membership functions need not be the same). The following rule: 1 3 2 1 2 will mean m = 2 (for 2 input variables), n = 1 (for 1 output variable), and the last 2 columns represent weight and fuzzy operator for the rule's antecedent respectively. The first column refers to the first input variable's membership function at index 1. The second column refers to the second input variable's membership function at index 3. The third column refers to the first output variable's membership function at index 2. The fourth column refers to the weight to be applied to the rule. The fifth column refers to the fuzzy operator for the rule's antecedent (in this case it represents 'OR').

    Examples

    Run this code
    FIS <<- tippertest()
    FIS <<- addRule(FIS, c(2,2,1,1,1))

    Run the code above in your browser using DataLab