@@ -329,7 +329,10 @@ def test_numeric_split_direction(use_missing, zero_as_missing):
329
329
node = bst .dump_model ()["tree_info" ][0 ]["tree_structure" ]
330
330
while "decision_type" in node :
331
331
direction = lgb .plotting ._determine_direction_for_numeric_split (
332
- case_with_zero [0 ][node ["split_feature" ]], node ["threshold" ], node ["missing_type" ], node ["default_left" ]
332
+ fval = case_with_zero [0 ][node ["split_feature" ]],
333
+ threshold = node ["threshold" ],
334
+ missing_type_str = node ["missing_type" ],
335
+ default_left = node ["default_left" ],
333
336
)
334
337
node = node ["left_child" ] if direction == "left" else node ["right_child" ]
335
338
assert node ["leaf_index" ] == expected_leaf_zero
@@ -340,7 +343,10 @@ def test_numeric_split_direction(use_missing, zero_as_missing):
340
343
node = bst .dump_model ()["tree_info" ][0 ]["tree_structure" ]
341
344
while "decision_type" in node :
342
345
direction = lgb .plotting ._determine_direction_for_numeric_split (
343
- case_with_nan [0 ][node ["split_feature" ]], node ["threshold" ], node ["missing_type" ], node ["default_left" ]
346
+ fval = case_with_nan [0 ][node ["split_feature" ]],
347
+ threshold = node ["threshold" ],
348
+ missing_type_str = node ["missing_type" ],
349
+ default_left = node ["default_left" ],
344
350
)
345
351
node = node ["left_child" ] if direction == "left" else node ["right_child" ]
346
352
assert node ["leaf_index" ] == expected_leaf_nan
@@ -377,10 +383,10 @@ def test_example_case_in_tree_digraph():
377
383
edge_to_node = [e for e in gbody if f"-> split{ split_index } " in e ]
378
384
if node ["decision_type" ] == "<=" :
379
385
direction = lgb .plotting ._determine_direction_for_numeric_split (
380
- example_case [0 ][node ["split_feature" ]],
381
- node ["threshold" ],
382
- node ["missing_type" ],
383
- node ["default_left" ],
386
+ fval = example_case [0 ][node ["split_feature" ]],
387
+ threshold = node ["threshold" ],
388
+ missing_type_str = node ["missing_type" ],
389
+ default_left = node ["default_left" ],
384
390
)
385
391
else :
386
392
makes_categorical_splits = True
0 commit comments