BBQ_CV
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.
BBQ_CV(actual, predicted, method_for_prediction = 0, n_folds = 10, seed, input)
actual
: vector of observed class labels (0/1)predicted
: vector of uncalibrated predictionsmethod_for_prediction
: 0=selection, 1=averaging, Default: 0n_folds
: number of folds in the cross-validation, Default: 10seed
: random seed to alternate the split of data set partitionsinput
: specify if the input was scaled or transformed, scaled=1, transformed=2list 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
## 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)
Useful links