netcal.regularization

Regularization Methods for Confidence Calibration

Regularization methods which are applied during model training. These methods should achieve a confidence calibration during model training. For example, the Confidence Penalty penalizes confident predictions and prohibits over-confident estimates. Use the functions to obtain the regularization and callback instances with prebuild parameters.

Available functions

confidence_penalty(X, weight[, threshold, base])

Confidence Penalty Regularization.

ConfidencePenalty([weight, threshold, reduction])

Confidence penalty regularization implementation for PyTorch.

MMCEPenalty([weight])

Maximum mean calibration error (MMCE).

DCAPenalty([weight])

Difference between Confidence and Accuracy (DCA).