---
title: "add(predicted:groundTruth:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/classificationmetrics/add(predicted:groundtruth:)"
---

# add(predicted:groundTruth:)

Updates the metrics with more predicted and ground truth labels.

## Declaration

```swift
mutating func add(predicted: some Sequence<Label>, groundTruth: some Sequence<Label>)
```

## Parameters

- `predicted`: The predicted labels.
- `groundTruth`: The true labels.

## Discussion

Discussion The predicted and ground truth sequences are matched element by element in the order they are provided. Both sequences must have the same number of elements.

## See Also

### Updating the metrics

- [add(_:)](createmlcomponents/classificationmetrics/add(_:).md)
