Structure

MLActivityClassifier.ModelParameters

Parameters that affect the process of training an activity classification model.

Declaration

struct MLActivityClassifier.ModelParameters

Topics

Creating Parameters

init(validationData: MLActivityClassifier.DataSource, batchSize: Int?, maximumIterations: Int?, predictionWindowSize: Int?)

Creates a new set of activity classifier parameters with validation data represented by a data source.

init(validationData: MLDataTable?, batchSize: Int?, maximumIterations: Int?, predictionWindowSize: Int?)

Creates a new set of activity classifier parameters with validation data represented by a data table.

Validating the Model

var validationData: MLDataTable?

Activity data the training process uses for validation.

Configuring Model Training

var batchSize: Int?

The number of sequence chunks the model uses per training iteration.

var maximumIterations: Int?

The maximum number of iterations over the training data the model should perform during training.

var predictionWindowSize: Int?

The number of samples for each labelled activity.

Describing Parameters

var description: String

A text representation of the model parameters.

var debugDescription: String

A text representation of the model parameters that’s suitable for output during debugging.

var playgroundDescription: Any

A description of the model parameters shown in a playground.

See Also

Creating and Training an Activity Classifier

enum MLActivityClassifier.DataSource

A data source for an activity classifier.

let modelParameters: MLActivityClassifier.ModelParameters

The configuration parameters that the activity classifier used for training during initialization.

var featureColumns: [String]

The names of the columns you selected at initialization to train the activity classifier.

var labelColumn: String

The name of the column you selected at initialization to define which activities the classifier predicts.

var recordingFileColumn: String

The name of the column the classifier used at initialization that contains the file names of the activity recordings.