MaxFeatureSelection
Enums · AiDotNet.Enums
How many features a tree considers at each split, for the random-forest family.
For Beginners
Each tree in a forest looks at only some of the available inputs when deciding how to split, which keeps the trees different from each other. This picks how many.
How It Works
Replaces a string option that accepted “sqrt”, “log2”, “all” or a parsed integer. The
string form had a silent failure mode: its switch ended in
_ => (int)Math.Ceiling(Math.Sqrt(NumFeatures)), so "log 2", "Sqrt " or any
typo compiled, ran, and quietly trained a DIFFERENT model than the caller asked for. An enum
cannot be mistyped.
An explicit feature COUNT is expressed separately (see the owning options’ MaxFeatureCount)
rather than by an enum member, because a count is a number and folding it into a name-based choice
is what forced the string in the first place.
Fields
| Field | Summary |
|---|---|
MaxFeatureSelection All |
Every feature. |
MaxFeatureSelection Log2 |
Base-2 logarithm of the feature count, rounded up. |
MaxFeatureSelection Sqrt |
The square root of the feature count, rounded up. |
int value__ |