predict.xrf: Draw predictions from a RuleFit xrf model

Description Usage Arguments Examples

View source: R/xrf.R

Description

Draw predictions from a RuleFit xrf model

Usage

1
2
3
4
5
6
7
8
9
## 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

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

holub008/xrf documentation built on May 6, 2020, 9:02 p.m.