Contents

makeTrainingSession(trainingData:targetColumn:featureColumns:parameters:sessionParameters:)

Creates or restores a training session.

Declaration

static func makeTrainingSession(trainingData: DataFrame, targetColumn: String, featureColumns: [String]? = nil, parameters: MLBoostedTreeClassifier.ModelParameters = .init(), sessionParameters: MLTrainingSessionParameters = _defaultSessionParameters) throws -> MLTrainingSession<MLBoostedTreeClassifier>

Parameters

  • trainingData:

    A DataFrame specifying training data.

  • targetColumn:

    A String specifying the target column name in the trainingData

  • featureColumns:

    An optional list of Strings specifying feature columns to be used to predict the target, if not provided, default to use all the other columns in the trainingData, except the one specified by targetColumn.

  • parameters:

    Model training parameters. See Modelparameters Swift.struct for the defaults.

  • sessionParameters:

    Training session parameters. See Mltrainingsessionparameters for the defaults.

Return Value

A MLTrainingSession that can be used to start or resume training.

See Also

Training a boosted tree classifier asynchronously