predict.xrf: Draw predictions from a RuleFit xrf model

View source: R/xrf.R

predict.xrfR Documentation

Draw predictions from a RuleFit xrf model

Description

Draw predictions from a RuleFit xrf model

Usage

## S3 method for class 'xrf'
predict(
  object,
  newdata,
  sparse = TRUE,
  lambda = "lambda.min",
  type = "response",
  ...
)

Arguments

object

an object of class "xrf"

newdata

data to predict on

sparse

a logical indicating whether a sparse design matrix should be used

lambda

the lasso penalty parameter to be applied

type

the type of predicted value produced

...

ignored arguments

Examples

m <- xrf(Petal.Length ~ ., iris,
         xgb_control = list(nrounds = 2, max_depth = 2),
         family = 'gaussian')
predictions <- predict(m, iris)


holub008/xrf documentation built on June 17, 2022, 2:33 p.m.