model.matrix.xrf | R Documentation |
Generate the design matrix from an eXtreme RuleFit model
## S3 method for class 'xrf' model.matrix(object, data, sparse = TRUE, ...)
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 |
m <- xrf(Petal.Length ~ ., iris, xgb_control = list(nrounds = 2, max_depth = 2), family = 'gaussian') design <- model.matrix(m, iris, sparse = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.