Skip to content

Commit aa26b73

Browse files
Update tree_ensemble_common.py (#691)
See issue #688 Signed-off-by: tiago-rib-goncalves <[email protected]>
1 parent a105247 commit aa26b73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

onnxmltools/convert/sparkml/operator_converters/tree_ensemble_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def sparkml_tree_dataset_to_sklearn(tree_df, is_classifier):
2828
if isinstance(item, dict):
2929
try:
3030
feature.append(item["featureIndex"])
31-
threshold.append(item["leftCategoriesOrThreshold"])
31+
threshold.append(item["leftCategoriesOrThreshold"][0] if len(item["leftCategoriesOrThreshold"]) >= 1 else -1.0)
3232
except KeyError:
3333
raise RuntimeError(f"Unable to process {item}.")
3434
else:

0 commit comments

Comments
 (0)