Learn R Programming

Rfuzzycoco (version 0.1.0)

predict.fuzzycoco_fit: predict the outcome on some input data using a fitted model

Description

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

Usage

# S3 method for fuzzycoco_fit
predict(object, x, verbose = FALSE, bin = TRUE, ...)

Value

the predicted output data as a data frame

Arguments

object

the fuzzycoco_fit object containing the fuzzy system to predict on

x

the input data to use with the fuzzy system to predict the output

verbose

whether to be verbose

bin

whether to transform the output data into a binary response. Only applies to classification models.

...

not used. Only for S3 generic consistency

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)

y2 <- predict(fit, x)

Run the code above in your browser using DataLab