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

View source: R/xrf.R

model.matrix.xrfR Documentation

Generate the design matrix from an eXtreme RuleFit model

Description

Generate the design matrix from an eXtreme RuleFit model

Usage

## 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

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


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