View source: R/048_PartitionConfig.R
| partition | R Documentation |
A held-out split is a decision – which rows train, which are held out, and
by what rule – and a decision the record cannot report is one nothing
downstream can audit. partition() makes it a first-class, executed step,
the same way ingest() makes reading a file one: the config states the
rule, this function applies it and returns a manifest naming exactly what
happened, including a DataFingerprint of each side.
Not a SuperConfig property. SuperConfig's dat_training_path and
dat_test_path simply name whatever partition() (or any other step)
produced – the same relationship they already have with ingest()'s
output.
partition(dat, config, outdir = NULL, overwrite = FALSE, verbosity = 1L)
dat |
data.frame or data.table: The dataset to split. |
config |
|
outdir |
Optional Character: Directory to write |
overwrite |
Logical: If TRUE, overwrite existing output files. |
verbosity |
Integer: Verbosity level. |
Named list: the partition manifest – config, source (a
DataFingerprint of dat), and outputs (a list with training and
test, each holding a fingerprint and, when outdir is given, the path
written to).
EDG
partition(iris, setup_RandomPartition(train_p = 0.8, seed = 2026L))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.