Problem with parameter optimization (minChildSize, Random Forest)

Dear all,

I would like to use optimize parameters with the “Parameter Optimization Loop nodes” for a rando forest model.

Parameters to be optimized:

  • Number of Trees (numTrees):
  • Start vakue: 200
  • Stop value: 350
  • Step size: 50
  • Tree Depth (maxDepth):
  • Start value : 10
  • Stop value: 18
  • Step size: 4
  • Minimum Node Size (minNodeSize):
  • Start value: 10
  • Stop value: 30
  • Step size: 10
  • Minimum Child Size (minChildSize):
  • Start value: 5
  • Stop value: 15
  • Step size: 5

Unfortunately, I always get the same error message: “Invalid minimum child size (10); must be at most 2 x minimum node size (10)”. I have tried countless other combination. The error remains.

Can anyone help me out?

Best regards,
DA

The error message is worded weirdly.

If you take a look at the description of the Tree Ensemble Learner node:

Minimum split node size is the minimum number of records in a decision tree node so that another split is attempted. If enabled, this number needs to be at least twice as large as the minimum child node size (as otherwise for binary splits one of the two children would have less records than specified).

Minimum child node size is the minimum number of records in child nodes. It can be at most half of the minimum split node size (see above).

Your parameters result in a situation where the minimum child node size can equal more than 1/2 of the minimum node split size. Or said the other way around, the minimum node split size can be less than 2x the minimum child node size.

This is not allowed.

For example, if you’re using a brute force search, then iteration 36 will be the first to fail :

Iteration minChildSize minNodeSize maxDeph numTrees 0.5 x minNodeSize is minChildSize acceptable?
0 5 10 10 200 5 Pass
1 5 10 10 250 5 Pass
2 5 10 10 300 5 Pass
3 5 10 10 350 5 Pass
4 5 10 14 200 5 Pass
5 5 10 14 250 5 Pass
6 5 10 14 300 5 Pass
7 5 10 14 350 5 Pass
8 5 10 18 200 5 Pass
9 5 10 18 250 5 Pass
10 5 10 18 300 5 Pass
11 5 10 18 350 5 Pass
12 5 20 10 200 10 Pass
13 5 20 10 250 10 Pass
14 5 20 10 300 10 Pass
15 5 20 10 350 10 Pass
16 5 20 14 200 10 Pass
17 5 20 14 250 10 Pass
18 5 20 14 300 10 Pass
19 5 20 14 350 10 Pass
20 5 20 18 200 10 Pass
21 5 20 18 250 10 Pass
22 5 20 18 300 10 Pass
23 5 20 18 350 10 Pass
24 5 30 10 200 15 Pass
25 5 30 10 250 15 Pass
26 5 30 10 300 15 Pass
27 5 30 10 350 15 Pass
28 5 30 14 200 15 Pass
29 5 30 14 250 15 Pass
30 5 30 14 300 15 Pass
31 5 30 14 350 15 Pass
32 5 30 18 200 15 Pass
33 5 30 18 250 15 Pass
34 5 30 18 300 15 Pass
35 5 30 18 350 15 Pass
36 10 10 10 200 5 Fail
37 10 10 10 250 5 Fail
38 10 10 10 300 5 Fail
39 10 10 10 350 5 Fail
40 10 10 14 200 5 Fail
41 10 10 14 250 5 Fail
42 10 10 14 300 5 Fail
43 10 10 14 350 5 Fail
44 10 10 18 200 5 Fail
45 10 10 18 250 5 Fail
46 10 10 18 300 5 Fail
47 10 10 18 350 5 Fail
48 10 20 10 200 10 Pass
49 10 20 10 250 10 Pass
50 10 20 10 300 10 Pass
51 10 20 10 350 10 Pass
52 10 20 14 200 10 Pass
53 10 20 14 250 10 Pass
54 10 20 14 300 10 Pass
55 10 20 14 350 10 Pass
56 10 20 18 200 10 Pass
57 10 20 18 250 10 Pass
58 10 20 18 300 10 Pass
59 10 20 18 350 10 Pass
60 10 30 10 200 15 Pass
61 10 30 10 250 15 Pass
62 10 30 10 300 15 Pass
63 10 30 10 350 15 Pass
64 10 30 14 200 15 Pass
65 10 30 14 250 15 Pass
66 10 30 14 300 15 Pass
67 10 30 14 350 15 Pass
68 10 30 18 200 15 Pass
69 10 30 18 250 15 Pass
70 10 30 18 300 15 Pass
71 10 30 18 350 15 Pass
72 15 10 10 200 5 Fail
73 15 10 10 250 5 Fail
74 15 10 10 300 5 Fail
75 15 10 10 350 5 Fail
76 15 10 14 200 5 Fail
77 15 10 14 250 5 Fail
78 15 10 14 300 5 Fail
79 15 10 14 350 5 Fail
80 15 10 18 200 5 Fail
81 15 10 18 250 5 Fail
82 15 10 18 300 5 Fail
83 15 10 18 350 5 Fail
84 15 20 10 200 10 Fail
85 15 20 10 250 10 Fail
86 15 20 10 300 10 Fail
87 15 20 10 350 10 Fail
88 15 20 14 200 10 Fail
89 15 20 14 250 10 Fail
90 15 20 14 300 10 Fail
91 15 20 14 350 10 Fail
92 15 20 18 200 10 Fail
93 15 20 18 250 10 Fail
94 15 20 18 300 10 Fail
95 15 20 18 350 10 Fail
96 15 30 10 200 15 Pass
97 15 30 10 250 15 Pass
98 15 30 10 300 15 Pass
99 15 30 10 350 15 Pass
100 15 30 14 200 15 Pass
101 15 30 14 250 15 Pass
102 15 30 14 300 15 Pass
103 15 30 14 350 15 Pass
104 15 30 18 200 15 Pass
105 15 30 18 250 15 Pass
106 15 30 18 300 15 Pass
107 15 30 18 350 15 Pass

My advice is to specify either the Minimum node split size or the Minimum child node size, not both.

1 Like