<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/BoostedTreeClassifier",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents21BoostedTreeClassifierV"
  },
  "title" : "BoostedTreeClassifier"
}
-->

# BoostedTreeClassifier

A gradient boosted decision tree classifier.

```
struct BoostedTreeClassifier<Label> where Label : Comparable, Label : Decodable, Label : Encodable, Label : Hashable
```

## Topics

### Creating a classifier

[`init(labels: Set<Label?>, annotationColumnName: String, featureColumnNames: [String], configuration: BoostedTreeConfiguration)`](/documentation/CreateMLComponents/BoostedTreeClassifier/init(labels:annotationColumnName:featureColumnNames:configuration:))

Creates a boosted tree classifier.

### Getting the properties

[`var annotationColumnID: ColumnID<Label>`](/documentation/CreateMLComponents/BoostedTreeClassifier/annotationColumnID)

The annotation column identifier.

[`var featureColumnNames: [String]`](/documentation/CreateMLComponents/BoostedTreeClassifier/featureColumnNames)

The names of the columns containing feature values.

[`var configuration: BoostedTreeConfiguration`](/documentation/CreateMLComponents/BoostedTreeClassifier/configuration)

Boosted tree configuration.

[`var labels: Set<Label?>`](/documentation/CreateMLComponents/BoostedTreeClassifier/labels)

The set of possible labels.

### Fitting the classifier

[`func fitted(to: DataFrame, validateOn: DataFrame?, eventHandler: EventHandler?) async throws -> TreeClassifierModel<Label>`](/documentation/CreateMLComponents/BoostedTreeClassifier/fitted(to:validateOn:eventHandler:))

Fits a boosted tree classifier model to a collection of examples.

[`typealias Annotation`](/documentation/CreateMLComponents/BoostedTreeClassifier/Annotation)

The annotation type.

[`typealias Transformer`](/documentation/CreateMLComponents/BoostedTreeClassifier/Transformer)

The transformer type created by this estimator.

### Encoding the classifier labels

[`func encodeLabels(some Collection<Optional<Label>>) throws -> (labels: [String?], encoded: [Int])`](/documentation/CreateMLComponents/BoostedTreeClassifier/encodeLabels(_:))

### Default Implementations

[UpdatableSupervisedTabularEstimator Implementations](/documentation/CreateMLComponents/BoostedTreeClassifier/UpdatableSupervisedTabularEstimator-Implementations)

## Relationships

### Conforms To

[`SupervisedTabularEstimator`](/documentation/CreateMLComponents/SupervisedTabularEstimator)

[`UpdatableSupervisedTabularEstimator`](/documentation/CreateMLComponents/UpdatableSupervisedTabularEstimator)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Copyable`](/documentation/Swift/Copyable)

[`Escapable`](/documentation/Swift/Escapable)

[`Sendable`](/documentation/Swift/Sendable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)