---
title: "makeTrainingSession(trainingData:featureColumns:labelColumn:recordingFileColumn:parameters:sessionParameters:)"
framework: Create ML
role: symbol
role_heading: Type Method
platforms: [macOS 11.0+]
path: "createml/mlactivityclassifier/maketrainingsession(trainingdata:featurecolumns:labelcolumn:recordingfilecolumn:parameters:sessionparameters:)-3ic8k"
---

# makeTrainingSession(trainingData:featureColumns:labelColumn:recordingFileColumn:parameters:sessionParameters:)

Creates an asynchronous training session for an activity classifier.

## Declaration

```swift
static func makeTrainingSession(trainingData: MLDataTable, featureColumns: [String], labelColumn: String, recordingFileColumn: String, parameters: MLActivityClassifier.ModelParameters = ModelParameters(validationData: nil), sessionParameters: MLTrainingSessionParameters = _defaultSessionParameters) throws -> MLTrainingSession<MLActivityClassifier>
```

## Parameters

- `trainingData`: An doc://com.apple.createml/documentation/CreateML/MLDataTable instance that contains a collection of sensor data that groups data entries by activity label.
- `featureColumns`: The names of the columns in the data table that contain sensor data.
- `labelColumn`: The name of the column in the data table that contains activity labels.
- `recordingFileColumn`: The name of the column in the data table that contains data filenames.
- `parameters`: An doc://com.apple.createml/documentation/CreateML/MLActivityClassifier/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 MLTrainingSession that represents the activity classifier training session.
