---
title: rowSubsample
framework: createmlcomponents
role: symbol
role_heading: Instance Property
path: createmlcomponents/boostedtreeconfiguration/rowsubsample
---

# rowSubsample

Subsample ratio of the training set in each iteration of tree construction.

## Declaration

```swift
var rowSubsample: Double
```

## Discussion

Discussion This is called the bagging trick and can usually help prevent overfitting. Setting this to a value of 0.5 results in the model randomly sampling half of the examples (rows) to grow each tree. Must be in the range (0, 1).

## See Also

### Inspecting the configuration

- [columnSubsample](createmlcomponents/boostedtreeconfiguration/columnsubsample.md)
- [earlyStoppingIterationCount](createmlcomponents/boostedtreeconfiguration/earlystoppingiterationcount.md)
- [learningRate](createmlcomponents/boostedtreeconfiguration/learningrate.md)
- [maximumDepth](createmlcomponents/boostedtreeconfiguration/maximumdepth.md)
- [maximumIterations](createmlcomponents/boostedtreeconfiguration/maximumiterations.md)
- [minimumChildWeight](createmlcomponents/boostedtreeconfiguration/minimumchildweight.md)
- [minimumLossReduction](createmlcomponents/boostedtreeconfiguration/minimumlossreduction.md)
- [parallelTreeCount](createmlcomponents/boostedtreeconfiguration/paralleltreecount.md)
- [randomSeed](createmlcomponents/boostedtreeconfiguration/randomseed.md)
- [stepSize](createmlcomponents/boostedtreeconfiguration/stepsize.md)
