question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unsupported splitting criterion error in convert_lightgbm

See original GitHub issue

Hi

I am facing below error
ValueError: Unsupported splitting criterion: %s. Only <=, <, >=, and > are allowed.
while converting my LGBMClassifier model to ONNX.

Python - 3.7.1 installed through Anaconda on Mac ONNX installed through conda install -y -c conda-forge onnx
onnxmltools & onnxruntime installed through pip

Any idea what is causing this error and how to resolve it?
Does sklearn API of lightgbm is not supported for converting to onnx?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AwasthiMaddycommented, Apr 18, 2019

Hi @vinitra & @xadupre

Even in Python 3.6, I am still facing the same error.

Actually in LightGBM there is an option to specify categorical_feature in LGBMClassifier.fit and it handles those features in different manner. In my LGB Model I had passed one feature as categorical_feature, after removing that feature as categorical and retraining the lightgbm model, I was able to convert it into ONNX.

1reaction
AwasthiMaddycommented, Apr 17, 2019

Previously I had installed ONNX through PyPI and was facing the AttributeError as in below issue https://github.com/onnx/onnxmltools/issues/135 So as per the last comment in that issue, I uninstall ONNX and installed it back from conda and so that error vanished but I got this error.
Anyways let me try to install onnx in python 3.6 and try again

Read more comments on GitHub >

github_iconTop Results From Across the Web

11.2 Splitting Criteria | Introduction to Data Science
The splitting criteria used by the regression tree and the classification tree are different. Like the regression tree, the goal of the classification...
Read more >
Why does a regression tree not split based on variance?
I'm wondering why we don't divide each term by the number of points in each region, i.e. left and right of the split?...
Read more >
Growing Decision Trees - MATLAB & Simulink - MathWorks
The algorithm splits MaxNumSplits nodes. Optimization criterion: Regression: mean-squared error (MSE). Choose a split to minimize the MSE of predictions ...
Read more >
Splitting Criteria - SAS Help Center
The HPSPLIT procedure provides two types of criteria for splitting a parent node : criteria ... The entropy, Gini index, and RSS criteria...
Read more >
Comparison of splitting methods on survival tree - PubMed
We compare splitting methods for constructing survival trees that are used as a model of survival time based on covariates. A number of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found