Skip to content

Commit f619034

Browse files
committed
fix
1 parent 09c375a commit f619034

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

tests/python_package_test/test_plotting.py

+12-6
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,10 @@ def test_numeric_split_direction(use_missing, zero_as_missing):
329329
node = bst.dump_model()["tree_info"][0]["tree_structure"]
330330
while "decision_type" in node:
331331
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"],
333336
)
334337
node = node["left_child"] if direction == "left" else node["right_child"]
335338
assert node["leaf_index"] == expected_leaf_zero
@@ -340,7 +343,10 @@ def test_numeric_split_direction(use_missing, zero_as_missing):
340343
node = bst.dump_model()["tree_info"][0]["tree_structure"]
341344
while "decision_type" in node:
342345
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"],
344350
)
345351
node = node["left_child"] if direction == "left" else node["right_child"]
346352
assert node["leaf_index"] == expected_leaf_nan
@@ -377,10 +383,10 @@ def test_example_case_in_tree_digraph():
377383
edge_to_node = [e for e in gbody if f"-> split{split_index}" in e]
378384
if node["decision_type"] == "<=":
379385
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"],
384390
)
385391
else:
386392
makes_categorical_splits = True

0 commit comments

Comments
 (0)