Skip to content
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

02_end_to_end_machine_learning_project - LightGBM model not working #38

Open
2Nerds1BlackHole opened this issue Apr 23, 2024 · 0 comments

Comments

@2Nerds1BlackHole
Copy link

I had trouble installing lightgbm v3.2.1 (as suggested in the environment .yml) so I installed the latest I could, version 4.3.0. When I got to the lgb.train function in the book, the "early_stopping_rounds=200" parameter is used, but this parameter no longer (directly) exists in that function.

Omitting that parameter yields terrible results, but I found a compatibility fix on the LightGBM github repo. They removed this parameter and put it in something called callbacks.

I replaced "early_stopping_rounds=200" parameter with "callbacks=[lgb.early_stopping(stopping_rounds=200)]" and it worked just fine with results very similar to the book.

First time using github, so apologies if this doesn't go here. Hopefully this helps someone encountering the same issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant