8
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

LightGBMでVerboseがオフにならない件

Posted at

#解決策

train関数に、verbose_eval=Falseを加えましょう。

gbm = lgb.train(params,
                lgb_train,,
                valid_sets=lgb_eval,
                verbose_eval=False,)<<<<<<<<<<<<<

#ダメだった方法1

ドキュメントのParametersのページを読むと

verbosity, default = 1, type = int, aliases: verbose
controls the level of LightGBM’s verbosity
< 0: Fatal, = 0: Error (Warning), = 1: Info, > 1: Debug

このように書いてありますが、verbose=-1などとしても効きません。

#ダメだった方法2

また、ネットで調べると
gb_train = lgb.Dataset(X_train, y_train, params={'verbose': -1}, free_raw_data=False)
も見かけますが、これもダメです。

#理由
LightGBMのVerboseは学習の状況の出力ではなく、エラーなどの出力を制御しているのではないでしょうか。
誰か教えてください。

8
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?