BBQ_CV {CalibratR}R Documentation

BBQ_CV

Description

trains and evaluates the BBQ calibration model using folds-Cross-Validation (CV). The predicted values are partitioned into n subsets. A BBQ model is constructed on (n-1) subsets; the remaining set is used for testing the model. All test set predictions are merged and used to compute error metrics for the model.

Usage

BBQ_CV(actual, predicted, method_for_prediction = 0, n_folds = 10, seed,
  input)

Arguments

actual

vector of observed class labels (0/1)

predicted

vector of uncalibrated predictions

method_for_prediction

0=selection, 1=averaging, Default: 0

n_folds

number of folds in the cross-validation, Default: 10

seed

random seed to alternate the split of data set partitions

input

specify if the input was scaled or transformed, scaled=1, transformed=2

Value

list object containing the following components:

error

list object that summarizes discrimination and calibration errors obtained during the CV

pred_idx

which BBQ prediction method was used during CV, 0=selection, 1=averaging

type

"BBQ"

probs_CV

vector of calibrated predictions that was used during the CV

actual_CV

respective vector of true values (0 or 1) that was used during the CV

Examples

 ## Loading dataset in environment
 data(example)
 actual <- example$actual
 predicted <- example$predicted
 BBQ_model <- CalibratR:::BBQ_CV(actual, predicted, method_for_prediction=0, n_folds=4, 123, 1)

[Package CalibratR version 0.1.2 Index]