anfis.plotmf {FuzzyR} | R Documentation |
Plot membership functions for an ANFIS object
Description
Plots a 2D graph of all membership functions from the specified variable which must be part of an anfis object.
Usage
anfis.plotmf(
anfis,
varType,
varIndex,
xx = NULL,
timelimit = 0,
xlab = NULL,
ylab = NULL,
main = NULL
)
Arguments
anfis |
Requires an existing anfis as an argument. |
varType |
Can be either 'input' or 'output', representing the type of variable. |
varIndex |
A numerical integer, representing the index of the input or output variable whose membership functions shall be plotted (base 1). |
xx |
primary inputs for extra lines |
timelimit |
for perturbation |
xlab |
X axis label using font, size and color |
ylab |
Y axis label, same font attributes as xlab |
main |
The main title (on top) |
Value
A two dimensional graph displaying all the membership functions of a given variable.
Examples
fis <- anfis.tipper()
anfis <- anfis.builder(fis)
data.num <- 5
input.num <- length(fis$input)
input.stack <- matrix(rnorm(data.num*input.num), ncol=input.num)
y <- matrix(rnorm(data.num))
data.trn <- cbind(input.stack, y)
anfis.eval(anfis, input.stack)
anfis.final <- anfis.optimise(anfis, data.trn, epoch.total=500,
stepsize=0.01, rate.inc=1.1, rate.dec=0.9)
anfis.plotmf(anfis, 'input', 1)
anfis.plotmf(anfis.final, 'input', 1)
[Package FuzzyR version 2.3.2 Index]