# Classifications

    class Classifications: NSObject

Represents the list of classification for a given classifier head. Typically used as a result for classification tasks.
- `
  ### [init(head:categories:)](https://developers.google.com/edge/api/mediapipe/swift/audio/Classes/Classifications.md.txt#/c:objc(cs)MPPClassifications(im)initWithHeadIndex:categories:)

  ` Initializes a new `Classifications` object with the given head index and array of categories. Head name is initialized to `nil`.

  #### Declaration

  Swift

      convenience init(head headIndex: Int, categories: [ResultCategory])

  #### Parameters

  |---|---|
  | `headIndex` | The index of the classifier head. |
  | `categories` | An array of `Category` objects containing the predicted categories. |

  #### Return Value

  An instance of `Classifications` initialized with the given head index and array of categories.
- `
  ### [init(head:headName:categories:)](https://developers.google.com/edge/api/mediapipe/swift/audio/Classes/Classifications.md.txt#/c:objc(cs)MPPClassifications(im)initWithHeadIndex:headName:categories:)

  ` Initializes a new `Classifications` with the given head index, head name and array of categories.

  #### Declaration

  Swift

      init(head headIndex: Int, headName: String?, categories: [ResultCategory])

  #### Parameters

  |---|---|
  | `headIndex` | The index of the classifier head. |
  | `headName` | The name of the classifier head, which is the corresponding tensor metadata name. |
  | `categories` | An array of `Category` objects containing the predicted categories. |

  #### Return Value

  An object of `Classifications` initialized with the given head index, head name and array of categories.
- `
  ### [categories](https://developers.google.com/edge/api/mediapipe/swift/audio/Classes/Classifications.md.txt#/c:objc(cs)MPPClassifications(py)categories)

  ` An array of `Category` objects containing the predicted categories.

  #### Declaration

  Swift

      var categories: [ResultCategory] { get }

- `
  ### [headIndex](https://developers.google.com/edge/api/mediapipe/swift/audio/Classes/Classifications.md.txt#/c:objc(cs)MPPClassifications(py)headIndex)

  ` The index of the classifier head these entries refer to. This is useful for multi-head models.

  #### Declaration

  Swift

      var headIndex: Int { get }

- `
  ### [headName](https://developers.google.com/edge/api/mediapipe/swift/audio/Classes/Classifications.md.txt#/c:objc(cs)MPPClassifications(py)headName)

  ` The optional name of the classifier head, which is the corresponding tensor metadata name.

  #### Declaration

  Swift

      var headName: String? { get }