---
title: "trueNegativeCount(of:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/multilabelclassificationmetrics/truenegativecount(of:)"
---

# trueNegativeCount(of:)

Returns the number of times a label was not in the predicted or ground truth collections.

## Declaration

```swift
func trueNegativeCount(of label: Label) -> Int
```

## Parameters

- `label`: The label to use as true positive.

## Return Value

Return Value The true negative count.

## Discussion

Discussion If the label does not have a confidence threshold, the true negative count is 0. If the label has a confidence threshold NaN, the true negative count is the number elements in the ground truth collection that do not contain the label. If the label is not in the known set of labels, the true negative count is 0.

## See Also

### Computing and scoring

- [count(of:)](createmlcomponents/multilabelclassificationmetrics/count(of:).md)
- [f1Score(for:)](createmlcomponents/multilabelclassificationmetrics/f1score(for:).md)
- [falseNegativeCount(of:)](createmlcomponents/multilabelclassificationmetrics/falsenegativecount(of:).md)
- [falsePositiveCount(of:)](createmlcomponents/multilabelclassificationmetrics/falsepositivecount(of:).md)
- [precisionScore(for:)](createmlcomponents/multilabelclassificationmetrics/precisionscore(for:).md)
- [recallScore(for:)](createmlcomponents/multilabelclassificationmetrics/recallscore(for:).md)
- [truePositiveCount(of:)](createmlcomponents/multilabelclassificationmetrics/truepositivecount(of:).md)
