anfis.optimise {FuzzyR}R Documentation

ANFIS optimiser

Description

To optimise the performance of a given ANFIS model by learning the parameters in L1 and L4.

Usage

anfis.optimise(
  anfis,
  data.trn,
  data.chk = NULL,
  epoch.total = 100,
  stepsize = 0.1,
  rate.inc = 1.1,
  rate.dec = 0.9,
  method = c("gradient", "lse"),
  err.log = F,
  online = 0,
  lambda = 1,
  opt.by = "err.opt",
  err.trn.fix = T
)

Arguments

anfis

The given ANFIS model

data.trn

The input and output data pairs as training data

data.chk

The input and output data pairs as checking (validation) data

epoch.total

The total training epochs.

stepsize

The initial stepsize

rate.inc

increasing rate of the stepsize

rate.dec

decrasing rate of the stepsize

method

The learning algorithms for Layer 1 and Layer 4 respectively. default method=c("gradient", "lse")

err.log

T or F, the flag indicate whether to save the error log.

online

0 – batch; 1 – online; 2 – semi-online

lambda

The forgetting rate for the LSE algorithm

opt.by

To optimise the ANFIS model by: err.opt – optimisation error; err.trn – training error; err.chk – checking (validation) error.

err.trn.fix

T or F. When KM defuzzification is used for IT2 ANFIS, err.trn is not equal to err.opt. Hence, this flag is used for users to choose whether to fix this issue. The default value is set to T for the compatibility with previous built IT2 models. For T1 ANFIS, this flag can be set to F for speed improvement.

Value

The optimised ANFIS model.

Author(s)

Chao Chen

References

[1] C. Chen, R. John, J. Twycross, and J. M. Garibaldi, “An extended ANFIS architecture and its learning properties for type-1 and interval type-2 models,” in Proceedings IEEE International Conference on Fuzzy Systems, 2016, pp. 602–609.
doi: 10.1109/FUZZ-IEEE.2016.7737742

[2] C. Chen, R. John, J. Twycross, and J. M. Garibaldi, “Type-1 and interval type-2 ANFIS: a comparison,” in Proceedings IEEE International Conference on Fuzzy Systems, 2017, pp. 1–6.
doi: 10.1109/FUZZ-IEEE.2017.8015555

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)

[Package FuzzyR version 2.3.2 Index]