rwd_dgp | R Documentation |
Read in real world data from X and y.
rwd_dgp( X, y, support = NULL, data_split = FALSE, train_prop = 0.5, return_values = c("X", "y") )
X |
Data matrix or data frame. |
y |
Response vector. |
support |
Vector of feature indices in the true support of the DGP. |
data_split |
Logical; if |
train_prop |
Proportion of data in training set if |
return_values |
Character vector indicating what objects to return in list. Elements in vector must be one of "X", "y", "support". |
A list of the named objects that were requested in
return_values
. See brief descriptions below.
A data.frame
.
A response vector of length nrow(X)
.
A vector of feature indices indicating all features used in the true support of the DGP.
Note that if data_split = TRUE
and "X", "y"
are in return_values
, then the returned list also contains slots for
"Xtest" and "ytest".
# read in iris data iris_data <- rwd_dgp(X = iris %>% dplyr::select(-Species), y = iris$Species)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.