Learn R Programming

FisPro (version 1.0)

fis: fis class

Description

The fis class is the main class (Rcpp class) to open and use a Fuzzy Inference System.

Arguments

Fields

name

the name of the FIS.

input_size

the number of inputs in the FIS.

output_size

the number of outputs in the FIS.

Methods

constructor

argument: fis_file a FIS configuration file (can be built with FisPro software https://www.fispro.org). return: an object of fis.

infer

infers a value for each output from the input values argument: values numerical vector of input values. return: all infered outputs.

infer_output

infers a value for a single output from the input values argument: values numerical vector of input values. argument: output_number the number of the output to infer. return: the infered output.

References

Fuzzy Logic Elementary Glossary

Examples

Run this code
# NOT RUN {
# build the FIS
fis_file <- system.file("extdata", "test.fis", package = "FisPro")
fis <- new(fis, fis_file)

# infer all outputs
infered <- fis$infer(c(0.25, 0.75))
#infer first output
infered_output1 <- fis$infer_output(c(0.25, 0.75), 0)
#infer second output
infered_output2 <- fis$infer_output(c(0.25, 0.75), 1)

# }

Run the code above in your browser using DataLab