PartitionTrainAndPredict: Partition Train And Predict

Description Usage Arguments

View source: R/PartitionTrainAndPredict.R

Description

Partitions the study sample, fits the model and makes predictions with SuperLearner.

Usage

1
2
3
4
PartitionTrainAndPredict(study.sample,
  outcome.variable.name = "composite", model.names = c("ModelGAP",
  "ModelGerdin", "ModelKTS", "ModelRTS"), n.partitions = 2,
  save.to.results = TRUE, verbose = FALSE)

Arguments

study.sample

Data frame. The study.sample. No default.

outcome.variable.name

Character vector of length 1. The name of the outcome variable of interest. Defaults to "s30d".

n.partitions

Numeric vector of length 1. The number of partitions to create with PartitionSample. Accepted values are 2 or 3. If 2, a train and test set is created. If 3, train, validation, and test sets are created - the models is fitted on the training set, optimal breaks is gridsearched on the validation set, and the model is tested on the test set. Defaults to 2.

save.to.results

Logical. If TRUE SuperLearner predictions, outcome and tc in each partition is saved to the Results list. Defaults to TRUE.

verbose

Logical. If TRUE the modelling process is printed to console. Defaults to FALSE.

models.names

Character vector. The model names to stack in SuperLearner. Defaults to c("SL.gam", "SL.randomForest", "SL.nnet, SL.xgboost", "SL.svm")


citronmeliss/predictionpackr documentation built on Feb. 10, 2020, 12:19 a.m.