predict.bmbstats_cv_model: Predict from a 'cv_model'

Description Usage Arguments Value Examples

View source: R/cv-model-predict.R

Description

Predict from a cv_model

Usage

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

Arguments

object

A cv_model 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

1
2
3
4
5
m1 <- cv_model(
  Sepal.Length ~ . - Species,
  iris
)
predict(m1, new_data = iris)

mladenjovanovic/bmbstats documentation built on Aug. 5, 2020, 4:20 p.m.