<!--
{
  "availability" : [
    "iOS: 15.0.0 - 16.0.0",
    "iPadOS: 15.0.0 - 16.0.0",
    "macCatalyst: 15.0.0 - 16.0.0",
    "macOS: 10.14.0 - 11.0.0",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLDecisionTreeRegressor/ModelParameters-swift.struct/init(validationData:maxDepth:minLossReduction:minChildWeight:randomSeed:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML23MLDecisionTreeRegressorV15ModelParametersV14validationData8maxDepth16minLossReduction0L11ChildWeight10randomSeedAeA11MLDataTableVSg_SiS2dSitcfc"
  },
  "title" : "init(validationData:maxDepth:minLossReduction:minChildWeight:randomSeed:)"
}
-->

# init(validationData:maxDepth:minLossReduction:minChildWeight:randomSeed:)

Creates a new set of parameters.

```
init(validationData: MLDataTable? = nil, maxDepth: Int = 6, minLossReduction: Double = 0, minChildWeight: Double = 0.1, randomSeed: Int = 42)
```

## Parameters

`validationData`

The dataset used to monitor how well the model is generalizing.

    The default value is     `nil`     which will use an automatically sampled validation set.

`maxDepth`

The maximum depth of the tree. Must be a value of at least 1.

    The default value is 6.

`minLossReduction`

The minimum amount of reduction to the loss function that is required to make another
node to split the data. Larger values help prevent overfitting.

    The default value is 0.

`minChildWeight`

Determines the minimum weight of each leaf node of the tree. Larger values help prevent
overfitting.

    The default value is 0.1.

`randomSeed`

A seed for internal random operations. Set this value to ensure reproducible results.

    The default value is 42.

---

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)