A regressor that estimates the target by learning rules to split the data.
SDKs
- macOS 10.14+
- Xcode 10.0+
Framework
- Create ML
Declaration
struct MLDecisionTreeRegressor
A regressor that estimates the target by learning rules to split the data.
SDKs
Framework
struct MLDecisionTreeRegressor
init(training Data: MLData Table, target Column: String, feature Columns: [String]?, parameters: MLDecision Tree Regressor .Model Parameters)
Creates a Decision Tree Regressor from the feature columns in the training data to predict the values in the target column.
struct MLDecision Tree Regressor .Model Parameters
Parameters that affect the process of training a model.
let model Parameters: MLDecision Tree Regressor .Model Parameters
The underlying parameters used when training the model.
var target Column: String
The name of the column you selected at initialization to define which feature the regressor predicts.
var feature Columns: [String]
The names of the columns you selected at initialization to train the regressor.
var training Metrics: MLRegressor Metrics
Measurements of the regressor’s performance on the training data set.
var validation Metrics: MLRegressor Metrics
Measurements of the regressor’s performance on the validation data set.
func evaluation(on: MLData Table) -> MLRegressor Metrics
Returns metrics describing the regressor’s performance on the provided labeled data.
func predictions(from: MLData Table) -> MLUntyped Column
Predicts the target value from the provided data.
func write(to: URL, metadata: MLModel Metadata?)
Exports a Core ML model file for use in your app.
func write(to File: String, metadata: MLModel Metadata?)
Exports a Core ML model file for use in your app.
var model: MLModel
The underlying Core ML model stored in memory.
var description: String
A text representation of the decision tree regressor.
var debug Description: String
A text representation of the decision tree regressor that’s suitable for output during debugging.
var playground Description: Any
A description of the decision tree regressor shown in a playground.
struct MLLinear Regressor
A regressor that estimates the target as a linear function of the features.
struct MLRandom Forest Regressor
A regressor based on a collection of decision trees trained on subsets of the data.
struct MLBoosted Tree Regressor
A regressor based on a collection of decision trees combined with gradient boosting.