<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/TimeSeriesClassifier",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents20TimeSeriesClassifierV"
  },
  "title" : "TimeSeriesClassifier"
}
-->

# TimeSeriesClassifier

```
struct TimeSeriesClassifier<Scalar, Label> where Scalar : MLShapedArrayScalar, Scalar : BinaryFloatingPoint, Label : Comparable, Label : Decodable, Label : Encodable, Label : Hashable
```

## Topics

### Creating a time series classifier

[`init(labels:configuration:)`](/documentation/CreateMLComponents/TimeSeriesClassifier/init(labels:configuration:))

Creates a time series classifier.

### Inspecting a time series classifier

[`configuration`](/documentation/CreateMLComponents/TimeSeriesClassifier/configuration-swift.property)

The configuration.

[`labels`](/documentation/CreateMLComponents/TimeSeriesClassifier/labels)

The set of possible labels.

### Fitting a time series classifier

[`fitted(to:eventHandler:)`](/documentation/CreateMLComponents/TimeSeriesClassifier/fitted(to:eventHandler:))

Fits a time series classifier model to a sequence of examples.

[`fitted(to:validateOn:eventHandler:)`](/documentation/CreateMLComponents/TimeSeriesClassifier/fitted(to:validateOn:eventHandler:))

Fits a time series classifier model to a sequence of examples.

### Supporting types

[`TimeSeriesClassifier.Configuration`](/documentation/CreateMLComponents/TimeSeriesClassifier/Configuration-swift.typealias)

[`TimeSeriesClassifier.Model`](/documentation/CreateMLComponents/TimeSeriesClassifier/Model)

A time-series classifier model.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)