Setup SuperConfig object. SuperConfig is a portable, data-agnostic recipe:
dat_training_path is optional, so the same config can be validated, shared,
or described without data and have a path bound later (e.g. by the rtemis
CLI) before train.
Usage
setup_SuperConfig(
dat_training_path = NULL,
dat_validation_path = NULL,
dat_test_path = NULL,
character2factor = TRUE,
outcome = NULL,
features = NULL,
weights = NULL,
positive_class = NULL,
preprocessor_config = NULL,
decomposition_config = NULL,
hyperparameters = NULL,
tuner_config = NULL,
outer_resampling_config = NULL,
execution_config = setup_FutureExecution(),
question = NULL,
outdir = "results/",
verbosity = 1L
)Arguments
- dat_training_path
Character or NULL: Path to training data file. NULL leaves the recipe unbound; set it (or supply data) before train.
- dat_validation_path
Optional Character: Path to validation data file.
- dat_test_path
Optional Character: Path to test data file.
- character2factor
Logical: If TRUE, read character columns as factors. A delimited file carries no type information, so this is what decides whether a column of labels is a categorical predictor or an unusable string one. Applied to all three datasets.
- outcome
Optional Character: Name of the outcome column;
NULLfor rtemis's convention, the last column.- features
Optional Character vector: Names of the predictor columns;
NULLfor every column except the outcome.- weights
Optional Character: Column name in training data to use as observation weights. If NULL, no weights are used.
- positive_class
Character or NULL: For binary classification, the outcome level to treat as positive. NULL keeps the existing factor level order.
- preprocessor_config
Optional
SupervisedPreprocessorConfig: Configuration for data preprocessing.- decomposition_config
Optional
DecompositionConfig: Configuration for data decomposition.- hyperparameters
Optional
HyperparametersorHyperparametersSet: One model configuration or a named set of configurations searched as a union.- tuner_config
Optional
TunerConfig: Configuration for hyperparameter tuning.- outer_resampling_config
Optional
ResamplerConfig: Configuration for outer res resampling during model training.- execution_config
ExecutionConfigobject: Configuration for execution settings. Setup with setup_SerialExecution, setup_FutureExecution or setup_MiraiExecution.- question
Optional Character: Question to answer with the supervised learning analysis.
- outdir
Optional Character: Output directory for results;
NULLto write nothing to disk.- verbosity
Integer [0, Inf): Verbosity level.
Examples
if (FALSE) { # \dontrun{
# requires local data file
sc <- setup_SuperConfig(
dat_training_path = "train.csv",
preprocessor_config = setup_SupervisedPreprocessor(scale = TRUE),
hyperparameters = setup_LightRF(),
tuner_config = setup_GridSearch(),
outer_resampling_config = setup_KFold(),
execution_config = setup_FutureExecution(),
question = "Can we tell iris species apart given their measurements?",
outdir = "models/"
)
} # }