---
title: "precisionScore(for:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/multilabelclassificationmetrics/precisionscore(for:)"
---

# precisionScore(for:)

Computes the precision score for a class label.

## Declaration

```swift
func precisionScore(for label: Label) -> Float
```

## Parameters

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

## Return Value

Return Value The precision score for the given label.

## Discussion

Discussion Precision score is computed as the ratio truePositive / (truePositive + falsePositive).

## 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)
- [recallScore(for:)](createmlcomponents/multilabelclassificationmetrics/recallscore(for:).md)
- [trueNegativeCount(of:)](createmlcomponents/multilabelclassificationmetrics/truenegativecount(of:).md)
- [truePositiveCount(of:)](createmlcomponents/multilabelclassificationmetrics/truepositivecount(of:).md)
