Description Usage Arguments Value
View source: R/1-sample_random.R
This function splits a list of inputs and a list of outputs by random sampling. All inputs and outputs get split the same.
1 | sample_random(x, y, split = 67, scale = FALSE, normalize = FALSE)
|
x |
The input data or a list of input data. |
y |
The output data or a list of output data. |
split |
An integer. The training-test set split as a percentage. |
scale |
A logical. Toggles whether to scale each sample by the total sum, turning the measurements into proportions. |
normalize |
A logical. Toggles whether to normalize each feature by subtracting the training set minimum and dividing by the training set range. |
A nested list with two slots "train" and "test", each of which
contain another list with two more slots "x" and "y". These provide a
list of the processed inputs and outputs, respectively.
For example, access the training input with $train$x.
You can feed these lists to build
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.