Learn R Programming

Rfuzzycoco (version 0.1.0)

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

Description

N.B: just a S3 method method wrapping the evaluate_fuzzy_system() function

Usage

# S3 method for fuzzycoco_fit
evaluate(x, data, verbose = FALSE, ...)

Value

the evaluation as a named list:

  • fitness: the fitness value

  • metrics: the evaluation metrics as a named list

Arguments

x

the fuzzycoco_fit object containing the fuzzy system to evaluate

data

the data to evaluate the fuzzy system on

verbose

whether to be verbose

...

not used. Only for S3 generic consistency

Examples

Run this code
model <- fuzzycoco("regression", example_mtcars()$params, seed = 123)
df <- mtcars[c("mpg", "hp", "wt", "qsec")]
fit <- fit(model, qsec ~ ., df, engine = "rcpp", seed = 456, max_generations = 20)

res <- evaluate(fit, df)
print(res$fitness)

Run the code above in your browser using DataLab