train(trainingData:targetColumn:featureColumns:parameters:sessionParameters:)
Trains a boosted tree classifier.
Declaration
static func train(trainingData: DataFrame, targetColumn: String, featureColumns: [String]? = nil, parameters: MLBoostedTreeClassifier.ModelParameters = ModelParameters(), sessionParameters: MLTrainingSessionParameters = _defaultSessionParameters) throws -> MLJob<MLBoostedTreeClassifier>Parameters
- trainingData:
A
DataFramespecifying 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 MLJob that can be used to observe training progress.
Discussion
If sessionDirectory is provided it will save training progress. If there is progress already saved training will resume from the last checkpoint.