Description Usage Arguments Value Examples
View source: R/supervised_data.R
A function that utilizes tidymodels
's initial_split
function to perform data spltting
while providing convenient access to X
and y
portions of both the test split and the train split.
1 | supervised_data(data, xcols, ycols, ...)
|
data |
the original dataset to be used for splitting |
xcols |
a vector containing feature names (X) to be used as independent variables |
ycols |
a vector containing target names (y) to be used as dependent variables or labels |
... |
Additional parameters to pass to the |
A list of the following components.
data - The original dataset unchanged
train - The training portion of the dataset
test - The test portion of the dataset
xtrain - The training portion of the dataset containing X
features only.
ytrain - The training portion of the dataset containing y
targets only.
xtest - The test portion of the dataset containing X
features only.
ytest - The test portion of the dataset containing y
targets only.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.