---
title: "map(_:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/classificationdistribution/map(_:)"
---

# map(_:)

Creates a new classification distribution by applying a transformation to every element.

## Declaration

```swift
func map<T>(_ transform: (Classification<Label>) throws -> Classification<T>) rethrows -> ClassificationDistribution<T> where T : Hashable
```

## Parameters

- `transform`: A transformation closure.

## See Also

### Labeling and mapping

- [topLabels(_:)](createmlcomponents/classificationdistribution/toplabels(_:).md)
