model.matrix.xrf {xrf} | R 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)
[Package xrf version 0.2.2 Index]