Using Anfis (Adaptive Neuro Fuzzy System) in Knime

Is there a way to use Anfis algorithm from Matlab or R in Knime? A node or script?

Hi @mef,

Yes, of course! You can use the “frbs” package in R. Please follow the instructions below:

1- Install R on your system and then the “rserve” and “frbs” packages in R. Also, you need the KNIME Interactive R Statistics Integration extension in KNIME.

2- In KNIME, go to File > Preferences and then KNIME > R and enter the path to R home (e.g. C:\Program Files\R\R-3.6.1).

3- Now, in the R Learner node, you can use the “frbs.learn()” function from the “frbs” package. For example:

library(frbs)
data <- knime.in
control.ANFIS <- list(num.labels = 5, max.iter = 10, step.size = 0.01, type.tnorm = "MIN", type.implication.func = "ZADEH", name = "Sim-0")
knime.model <- frbs.learn(data, range.data = NULL, method.type = c("ANFIS"), control.ANFIS)

Where “knime.in” is the input table in which the last column is the target column and “knime.model” is the trained model which will be available in the output port of the learner node. Please check the “frbs.learn()” function documentation for more info:
https://search.r-project.org/CRAN/refmans/frbs/html/frbs.learn.html

4- Finally, use the R Predictor node to apply the model:

knime.out <- cbind(knime.in, predict(knime.model, knime.in))
2 Likes

Thank you very much.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.