addvar {FuzzyR} | R Documentation |
Insert a variable
Description
Adds an input or output variable to a fis object.
Usage
addvar(
fis,
varType,
varName,
varBounds,
method = NULL,
params = NULL,
firing.method = "tnorm.min.max"
)
Arguments
fis |
A fis must be provided. |
varType |
Should be either 'input' or 'output' which represents the type of variable to be created and added. |
varName |
A string representing the name of the variable. |
varBounds |
Also known as the 'range', this should be a vector giving a range for the variable, such as 1:10. |
method |
fuzzification or defuzzification method.
|
params |
the required parameters for the corresponding fuzzification or defuzzification method.
For example, the required parameters for |
firing.method |
the chosen method for getting the firing strength (for non-singleton fuzzification).
|
Value
A fis with the new variable added.
Examples
fis <- newfis('tipper')
fis <- addvar(fis, 'input', 'service', c(0, 10))
fis <- addvar(fis, 'input', 'service', c(0, 10), 'gauss', 0.5, 'tnorm.min.max')