RandomTreeSplit
Randomly splits the branches of a tree into three trees: a share pA of the branches goes to A, a share pB to B and the rest to C. Paths are kept; the same seed gives the same split.
Overview
RandomTreeSplit
Inputs (4)
- Tree (Generic): Tree
- pA (Number): pA
- pB (Number): pB
- seed (Number): seed
Outputs (3)
- A (Generic): A
- B (Generic): B
- C (Generic): C
Method, assumptions and simplifications
The same notes appear in the component's Info output.
Method
- The branch order is shuffled with a Fisher-Yates shuffle using .NET Random seeded with the integer part of seed.
- The first floor(pA × branch count) shuffled branches go to A, the next floor(pB × branch count) to B, the rest to C. Paths and items are kept.
Assumptions
- pA and pB are fractions with pA + pB ≤ 1.
Simplifications and limits
- Counts are rounded down, so C receives any remainder.