Structure

MLBoostedTreeRegressor

A regressor based on a collection of decision trees combined with gradient boosting.

Declaration

struct MLBoostedTreeRegressor

Topics

Creating and Training a Boosted Tree Regressor

init(trainingData: MLDataTable, targetColumn: String, featureColumns: [String]?, parameters: MLBoostedTreeRegressor.ModelParameters)

Creates a Boosted Tree Regressor from the feature columns in the training data to predict the values in the target column.

struct MLBoostedTreeRegressor.ModelParameters

Parameters that affect the process of training a model.

let modelParameters: MLBoostedTreeRegressor.ModelParameters

The underlying parameters used when training the model.

var targetColumn: String

The name of the column you selected at initialization to define which feature the regressor predicts.

var featureColumns: [String]

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

Assessing Model Accuracy

var trainingMetrics: MLRegressorMetrics

Measurements of the regressor’s performance on the training data set.

var validationMetrics: MLRegressorMetrics

Measurements of the regressor’s performance on the validation data set.

Evaluating a Boosted Tree Regressor

func evaluation(on: MLDataTable) -> MLRegressorMetrics

Returns metrics describing the regressor’s performance on the provided labeled data.

Testing a Boosted Tree Regressor

func predictions(from: MLDataTable) -> MLUntypedColumn

Predicts the target value from the provided data.

Saving a Boosted Tree Regressor

func write(to: URL, metadata: MLModelMetadata?)

Exports a Core ML model file for use in your app.

func write(toFile: String, metadata: MLModelMetadata?)

Exports a Core ML model file for use in your app.

Describing a Boosted Tree Regressor

var model: MLModel

The underlying Core ML model stored in memory.

var description: String

A text representation of the boosted tree regressor.

var debugDescription: String

A text representation of the boosted tree regressor that’s suitable for output during debugging.

var playgroundDescription: Any

A description of the boosted tree regressor shown in a playground.

See Also

Supporting Regressor Types

struct MLLinearRegressor

A regressor that estimates the target as a linear function of the features.

struct MLDecisionTreeRegressor

A regressor that estimates the target by learning rules to split the data.

struct MLRandomForestRegressor

A regressor based on a collection of decision trees trained on subsets of the data.