brif.formula {brif}R Documentation

Build a model (and make predictions) with formula

Description

Build a model (and make predictions) with formula

Usage

## S3 method for class 'formula'
brif(
  formula,
  data,
  subset,
  na.action = stats::na.pass,
  newdata = NULL,
  type = c("score", "class"),
  ...
)

Arguments

formula

an object of class "formula": a symbolic description of the model to be fitted.

data

an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which brif.formula is called.

subset

an optional vector specifying a subset (in terms of index numbers, not actual data) of observations to be used in the fitting process.

na.action

a function which indicates what should happen when the data contain NAs.

newdata

a data frame containing the data set for prediction. Default is NULL. If newdata is supplied, prediction results will be returned.

type

a character string specifying the prediction format, which takes effect only when newdata is supplied. Available values include "score" and "class". Default is "score".

...

additional algorithmic parameters. See brif.default for a complete list.

Value

an object of class brif to be used by predict.brif.

Examples

bf <- brif(Species ~ ., data = iris)
pred <- predict(bf, iris[,1:4])

[Package brif version 1.4.1 Index]