prediction(from:confidenceThresholds:)
Performs a prediction and keeps label-confidence pairs that are greater than or equal to the provided confidence thresholds.
Declaration
func prediction(from input: FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label>.Input, confidenceThresholds: [Label : Scalar]) throws -> ClassificationDistribution<Label>Parameters
- input:
The classifier input.
- confidenceThresholds:
A dictionary of label and confidence threshold pairs.
Return Value
A dictionary of labels and confidences.
Discussion
When the confidence threshold is NaN, the label-confidence pair is not included in the result, regardless of the label’s confidence.