Learn R Programming

Rfuzzycoco (version 0.1.0)

evaluate_fuzzy_system: evaluate the fuzzy system from a fit on some given data

Description

evaluate the fuzzy system from a fit on some given data

Usage

evaluate_fuzzy_system(fs, data, params, verbose = FALSE)

Value

the evaluation as a named list:

  • fitness: the fitness value

  • metrics: the evaluation metrics as a named list

Arguments

fs

the fuzzy system to evaluate (as a named list)

data

the data to evaluate the fuzzy system on

params

the fuzzycoco parameters. probably not needed...

verbose

whether to be verbose

Examples

Run this code
model <- fuzzycoco("regression", example_mtcars()$params, seed = 123)
x <- mtcars[c("mpg", "hp", "wt")]
y <- mtcars["qsec"]
fit <- fit_xy(model, x, y, progress = FALSE)

res <- evaluate_fuzzy_system(fit$fuzzy_system, cbind(x, y), fit$params)
print(res$metrics$rmse)

Run the code above in your browser using DataLab