View source: R/wrappers_xgboost.R
xgboost_dmatrix | R Documentation |
Create xgb.DMatrix object
xgboost_dmatrix(data, label = NULL, ...)
data |
Matrix or file. |
label |
Labels (optional). |
... |
Additional parameters. |
An xgb.DMatrix
object.
sim_data <- msaenet::msaenet.sim.binomial(
n = 100,
p = 10,
rho = 0.6,
coef = rnorm(5, mean = 0, sd = 10),
snr = 1,
p.train = 0.8,
seed = 42
)
xgboost_dmatrix(sim_data$x.tr, label = sim_data$y.tr)
xgboost_dmatrix(sim_data$x.te)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.