Skip to contents

Helper to retrieve validation set and predictions

Usage

get_valid_set(data, target, learner, cv_folds, treatment = NULL)

Arguments

data

(data.frame)
.

target

(string)
name of the target variable.

learner

(model_spec object)
the learner for training the prediction model. See parsnip::model_spec() for details.

cv_folds

(count)
number of CV+ folds.

treatment

(string)
name of the treatment variable, if applicable.

Value

Data frame with predictions and indices.