------------------------------------------------------------------------------------ Prepare dataset

prep_data(data, target_lab, task, feat_types = NULL)

Arguments

data

Original data frame with features to be converted to correct types.

target_lab

Name of the column in data that contains target/label information.

task

Character string indicating the type of problem, either 'classification' (categorical outcome) or 'regression' (continuous outcome).

feat_types

Named vector indicating the type of each features, e.g., c(sex = 'factor', age = 'numeric'). If feature types are not supplied, infer from column type.

Value

List of dataframes (training + test) with proper feature types and target name.