predict.fibre: Predict from a 'fibre'

View source: R/fibre-predict.R

predict.fibreR Documentation

Predict from a fibre

Description

Predict from a fibre

Usage

## S3 method for class 'fibre'
predict(object, new_data = NULL, type = "numeric", ...)

Arguments

object

A fibre object.

new_data

A data frame or matrix of new predictors.

type

A single character. The type of predictions to generate. Valid options are:

  • "numeric" for numeric predictions.

...

Not used, but required for extensibility.

Value

A tibble of predictions. The number of rows in the tibble is guaranteed to be the same as the number of rows in new_data.

Examples

train <- mtcars[1:20,]
test <- mtcars[21:32, -1]

# Fit
#mod <- fibre(mpg ~ cyl + log(drat), train)

# Predict, with preprocessing
#predict(mod, test)


rdinnager/fibre documentation built on Dec. 14, 2024, 10:33 a.m.