1= strategies.fixed_dictionaries(
2 {
3 "max_depth": strategies.integers(1, 11),
4 "max_leaves": strategies.integers(0, 1024),
5 "max_bin": strategies.integers(2, 512),
6 "multi_strategy": strategies.sampled_from(
7 ["multi_output_tree", "one_output_per_tree"]
8 ),
9 "grow_policy": strategies.sampled_from(["lossguide", "depthwise"]),
10 "min_child_weight": strategies.floats(0.5, 2.0),
11
12
13 "colsample_bytree": strategies.floats(0.5, 1.0),
14 "colsample_bylevel": strategies.floats(0.5, 1.0),
15 }
16).filter(
17 lambda x: (cast(int, x["max_depth"]) > 0 or cast(int, x["max_leaves"]) > 0)
18 and (cast(int, x["max_depth"]) > 0 or x["grow_policy"] == "lossguide")
19)