model.matrix.xrf: Generate the design matrix from an eXtreme RuleFit model

Description Usage Arguments Examples

View source: R/xrf.R

Description

Generate the design matrix from an eXtreme RuleFit model

Usage

1
2
## S3 method for class 'xrf'
model.matrix(object, data, sparse = TRUE, ...)

Arguments

object

an object of class "xrf"

data

data to generate design matrix from

sparse

a logical indicating whether a sparse design matrix should be used

...

ignored arguments

Examples

1
2
3
4
m <- xrf(Petal.Length ~ ., iris,
         xgb_control = list(nrounds = 20, max_depth = 2),
         family = 'gaussian')
design <- model.matrix(m, iris, sparse = FALSE)

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