Build a model (and make predictions) with formula
# S3 method for formula
brif(
formula,
data,
subset,
na.action = stats::na.pass,
newdata = NULL,
type = c("score", "class"),
...
)an object of class brif to be used by predict.brif.
an object of class "formula": a symbolic description of the model to be fitted.
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.
an optional vector specifying a subset (in terms of index numbers, not actual data) of observations to be used in the fitting process.
a function which indicates what should happen when the data contain NAs.
a data frame containing the data set for prediction. Default is NULL. If newdata is supplied, prediction results will be returned.
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.
bf <- brif(Species ~ ., data = iris)
pred <- predict(bf, iris[,1:4])
Run the code above in your browser using DataLab