Although one can call
predict_mode on a probabilistic binary classifier to get deterministic predictions, a more flexible strategy is to wrap the model using
BinaryThresholdPredictor, as this allows the user to specify the threshold probability for predicting a positive class. This wrapping converts a probablistic classifer into a deterministic one.
The positive class is always the second class returned when calling
levels on the training target
model, assumed to support binary classification, as a
Deterministic model, by applying the specified
threshold to the positive class probability. Can also be applied to outlier detection models that predict normalized scores - in the form of appropriate
UnivariateFinite distributions - that is, models that subtype
By convention the positive class is the second class returned by
y is the target.
threshold=0.5 then calling
predict on the wrapped model is equivalent to calling
predict_mode on the atomic model.