predictions.with.superlearner: Generate predictions with SuperLearner

Description Usage Arguments

View source: R/predictions.with.superlearner.r

Description

This function trains SuperLearner on the training set and makes predictions on the review set. Then, predictions are divided by quantiles into four colour-coded groups. The groups are green, yellow, orange, and red. They respectively include ranges from the 0

Usage

1
2
3
4
5
6
7
predictions.with.superlearner(prepped_sample, models = c("SL.glmnet",
  "SL.glm", "SL.randomForest", "SL.xgboost", "SL.gam"),
  save_breaks = FALSE, save_all_predictions = FALSE,
  save_superlearner = FALSE, sample = TRUE,
  gridsearch_parallel = FALSE, n_cores = NULL, verbose = TRUE,
  log = FALSE, boot = FALSE, write_to_disk = FALSE,
  clean_start = FALSE)

Arguments

prepped_sample

Data as prepared by prep.data.for.superlearner as list. No default.

models

Models to use in ensemble algorithm. Default: SL.mean and SL.glmnet.

save_breaks

Logical. If TRUE, save optimal breaks to results. Defaults to FALSE.

save_all_predictions

Logical. If TRUE all predictions are saved in pred_data. Defaults to FALSE.

save_superlearner

Logical. If TRUE the SuperLearner object is saved to disk and returned to results. Defaults to FALSE.

sample

Logical. If TRUE the grid search will only search a random sample of possible cutpoint combinations, not all. Defaults to TRUE.

gridsearch_parallel

Logical. If TRUE the gridsearch is performed in parallel. Defaults to FALSE.

n_cores

Integer. The number of cores to run any parallel computing on. Defaults to NULL.

verbose

Logical. If TRUE information to help gauge progress is printed. Defaults to TRUE.

log

Logical. If TRUE progress is logged in logfile. Defaults to FALSE.

boot

Logical. Affects only what is printed to logfile. If TRUE prepped_sample is assumed to be a bootstrap sample. Defaults to FALSE.

write_to_disk

Logical. If TRUE the prediction data is saved as RDS to disk. Defaults to FALSE.

clean_start

Logical. If TRUE the predictions directory and all files in it are removed before saving new stuff there. Defaults to FALSE.


itslwg/superlearnerr documentation built on July 31, 2020, 7:37 a.m.