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.

XGBRegressor converter is maybe broken

See original GitHub issue

It seems there are problems with the XGBRegressor converter.

I’ve opened an issue at sklearn-onnx but they redirected me to here: https://github.com/onnx/sklearn-onnx/issues/321

Here is a repro: https://gist.github.com/victornoel/06d6231f6276719ddba53cb381dfd468

I casted an int column to str because in my original dataset, we have categories made of numbers so I thought this could be related…

As we can see, the differences are huge: the predictions should be between 0 and 1 and the differences can be as big as 1 in my tests!

>>> import test
>>> test.test()
[0.9019426  0.91082716 0.91868186 0.94926846 1.0898147 ]
min(Y)-max(Y): 0 1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
xaduprecommented, Mar 3, 2020

I was able to replicate. I’ll have a look tomorrow.

0reactions
victornoelcommented, Mar 5, 2020

@xadupre thank you, I created an issue there: https://github.com/microsoft/onnxruntime/issues/3144

Let me close the current issue then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Data Preparation for Gradient Boosting with XGBoost in Python
We can easily convert the string values to integer values using the LabelEncoder. ... Maybe, this will be interest for your journey.
Read more >
Python API Reference — xgboost 1.7.2 documentation
Scikit-Learn Wrapper interface for XGBoost. class xgboost.XGBRegressor(*, objective ...
Read more >
Do you have to convert to DMatrix within an XGBoost ... - Reddit
Hi all, I've found a few examples online of running Grid searches on XGB models however in many of them they don't seem...
Read more >
Custom loss functions for XGBoost using PyTorch
... pd from xgboost import XGBRegressor import torch from torch.autograd ... calculate gradient and convert to numpy loss_grads = grad(loss, ...
Read more >
How to use XGBoost algorithm in R in easy steps
A simple method to convert categorical variable into numeric vector is One Hot Encoding. ... Now let's break down this code as follows:....
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