a one-row overview of a fuzzy system with the usage of variables, the fitness, number of generations and optionally a metric

fit_to_df(fit, metric = NULL)

Arguments

fit

a fit object, as returned by [fit.

metric

an optional metric name to report (e.g. rmse)

Value

a one-row data frame

See also

Other fit_utils: fs_rules_to_df(), fs_used_vars_to_df()

Examples

model <- fuzzycoco("regression", example_mtcars()$params, seed = 123)
df <- mtcars[c("mpg", "hp", "wt", "qsec")]
fit <- fit(model, qsec ~ ., df, seed = 456, max_generations = 10, progress = FALSE)

print(fit_to_df(fit))
#>     mpg   hp    wt qsec   fitness generations seed
#> 1 FALSE TRUE FALSE TRUE 0.3585895          10  456