---
title: "init(_:_:)"
framework: createmlcomponents
role: symbol
role_heading: Initializer
path: "createmlcomponents/classificationmetrics/init(_:_:)"
---

# init(_:_:)

Creates classification metrics for predicted and ground truth labels.

## Declaration

```swift
init<Predicted, Correct>(_ predicted: Predicted, _ groundTruth: Correct) where Label == Predicted.Element, Predicted : Collection, Correct : Collection, Predicted.Element == Correct.Element
```

## Discussion

Discussion The predicted and ground truth collections are matched element by element in the order they are provided. Both collections must have the same number of elements. Parameters predicted: The predicted labels. groundTruth: The true labels.

## See Also

### Creating the distribution

- [init()](createmlcomponents/classificationmetrics/init().md)
- [init(_:)](createmlcomponents/classificationmetrics/init(_:).md)
- [init(_:labels:)](createmlcomponents/classificationmetrics/init(_:labels:).md)
- [init(predicted:groundTruth:labels:)](createmlcomponents/classificationmetrics/init(predicted:groundtruth:labels:).md)
