Comments (2)
Hey @sktin, thanks for using LightGBM. I took a quick look and it seems that the model starts overfitting very quickly with the default settings. XGBoost sets regularization by default
lambda [default=1, alias: reg_lambda] (ref)
and LightGBM doesn't, so setting reg_lambda=1
improves the score (~0.83 for me).
To make the results reproducible there's a deterministic
parameter (docs)
deterministic, default = false, type = bool
used only with cpu device type
setting this to true should ensure the stable results when using the same data and the same parameters (and different num_threads)
In summary, you should be able to get a similar, consistent score as with the other models with the following:
test_classifier(LGBMClassifier(n_jobs=4,random_state=0,verbose=-1,reg_lambda=1,deterministic=True))
from lightgbm.
@jmoralez Thank you for the quick response.
I confirm that with reg_lambda=1
, even without using the deterministic
parameter, I am able to get "normal" and consistent AUC scores.
Out of curiosity, I set reg_lambda=0
in XGBClassifier
and it returns consistent score > 0.8 albeit lower than the default setting of reg_lambda=1
. As far as the original issue for LGBMClassifier
is concerned, I think it can be closed.
from lightgbm.
Related Issues (20)
- C API refitting HOT 6
- [python-package] bug : dump_model json loads failed HOT 2
- [R-package] latest {Matrix} requires R>=4.4.0
- [RFC] remove 'categorical_feature' and 'feature_name' parameters in cv() and train() HOT 6
- [RFC] remove HDFS support? HOT 3
- (transferred) [python-package] how to install the Python package from source? HOT 5
- [RFC] provide Python/R implementations of all the built-in objectives? HOT 1
- [python-package] Error in installation in github MacOS runners HOT 2
- [docs] readthedocs builds are broken HOT 1
- CMake `__BUILD_FOR_R` fails to find R source files HOT 4
- [docker] Update Tutorial for Installing LightGBM GPU on Docker Environment HOT 3
- [python-package] NumPy 2.0 support HOT 1
- LightGBM failed to testlightgbm.exe on MSVC HOT 1
- Lightgbm trains much slower than catboost. HOT 15
- Any suggestions for predicting all values to be 0? HOT 1
- [python-package] How to refit a classifier? HOT 4
- Uncertainty in LightGBM (again) HOT 4
- Can not predict with multithread? HOT 5
- [ci] CUDA 11.8 wheel (gcc) CI jobs failing: 'libomp.so.5: no such file or directory'
- [GPU] lightgbm.basic.LightGBMError: Check failed: (best_split_info.left_count) > (0), lightgbm.basic.LightGBMError: Check failed: (best_split_info.right_count) > (0)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightgbm.