---
title: "train(trainingData:parameters:sessionParameters:)"
framework: createml
role: symbol
role_heading: Type Method
path: "createml/mlactionclassifier/train(trainingdata:parameters:sessionparameters:)"
---

# train(trainingData:parameters:sessionParameters:)

Begins an asynchronous action classifier training session.

## Declaration

```swift
static func train(trainingData: MLActionClassifier.DataSource, parameters: MLActionClassifier.ModelParameters = ModelParameters(), sessionParameters: MLTrainingSessionParameters = _defaultSessionParameters) throws -> MLJob<MLActionClassifier>
```

## Parameters

- `trainingData`: A collection of labeled videos represented by a data source.
- `parameters`: An doc://com.apple.createml/documentation/CreateML/MLActionClassifier/ModelParameters-swift.struct instance you use to configure the model for the training session.
- `sessionParameters`: An doc://com.apple.createml/documentation/CreateML/MLTrainingSessionParameters instance you use to configure the training session.

## Return Value

Return Value An MLJob that represents the action classifier training session.

## See Also

### Training an action classifier asynchronously

- [makeTrainingSession(trainingData:parameters:sessionParameters:)](createml/mlactionclassifier/maketrainingsession(trainingdata:parameters:sessionparameters:).md)
- [resume(_:)](createml/mlactionclassifier/resume(_:).md)
- [restoreTrainingSession(sessionParameters:)](createml/mlactionclassifier/restoretrainingsession(sessionparameters:).md)
