LoginSignup
0
0

More than 1 year has passed since last update.

AttributeError: module 'optuna' has no attribute 'create_study'にはまった話

Posted at

はじめに

XGBRegressorのハイパーパラメータをチューニングしようとoptunaを使おうとしたときに、あまり見たことがないエラーを吐いたので、今後同じミスをしないように、記事を残しておきます。

エラーの詳細

AttributeError: module 'optuna' has no attribute 'create_study'

モジュールにはxxxという機能がありませんよ!って怒られてます...
どういうこっちゃ?

解決方法

ドキュメント見直しても、create_studyあるよなぁって思いながら、似た質問している人いないか探していたら、下記の記事を見つけました。

Visualization not working #308

ファイルの名前とモジュールの名前をうっかり一緒にしていました。モジュールとファイル名を同じにすると、今開いているファイルを優先してしまうみたい。

0
0
1

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
0
0