-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent results from LGBMRegressor
between versions 3.2.1 and 3.3.5
#5913
Comments
LGBMRegressor
between Versions 3.2.1 and 3.3.5LGBMRegressor
between versions 3.2.1 and 3.3.5
Hi @mayashaked, thanks for using LightGBM. Could you run these on the same LightGBM version? There are 2 variables at the moment, the LightGBM version and the CPU. Having said that, I think this issue is probably related to multithreading and having a different number of CPU cores. You can try setting |
Hi @jmoralez, thanks for the speedy response! I tried again with adding the
However, there is still a discrepancy with 3.2.1. Version 3.2.1 on the Intel processor machine yielded the following:
I am having trouble with running 3.2.1 on my M1 machine altogether but I think that's a separate issue related to my setup and outside the scope of this (potential) bug. I am still puzzled as to why running the same code on the same machine, and therefore removing the additional factor of CPU, would return different results. |
There has not yet been a LightGBM release that supports the M1/M2 Macs. See #4843 (comment). Sorry for the inconvenience, we are working on it.
Please see #5887 (comment). Briefly:
We don't consider these sources of non-deterministic behavior to be bugs. They tend to have a small impact on the results for larger datasets, in exchange for faster training time. |
Understood. Thanks! You can close out the issue. |
Sure, thanks very much for working with us and for the report. |
This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
Description
I have noticed a discrepancy in the output of the
LGBMRegressor
model when using version 3.2.1 vs. version 3.3.5 of LightGBM. Even when trained on the same data and with identical parameters, the model yields a different R-squared score. The discrepancy appears to be due to thecolsample_bytree
parameter.Reproducible example
On version 3.3.5, the above yields:
On version 3.2.1, it yields:
The discrepancy also exists when using more than two features. For example, I also tried using a sample dataset with three features defined as follows:
On 3.3.5, the code yields:
On 3.2.1, it yields:
Environment info
The results differed when using the following versions:
The text was updated successfully, but these errors were encountered: