Generate the design matrix from an eXtreme RuleFit model
# S3 method for xrf model.matrix(object, data, sparse = TRUE, ...)
an object of class "xrf"
data to generate design matrix from
a logical indicating whether a sparse design matrix should be used
ignored arguments
# NOT RUN { m <- xrf(Petal.Length ~ ., iris, xgb_control = list(nrounds = 20, max_depth = 2), family = 'gaussian') design <- model.matrix(m, iris, sparse = FALSE) # }
Run the code above in your browser using DataLab