質問するログイン新規登録

質問編集履歴

1

誤字・タイトル追記

2020/05/28 03:53

投稿

yyy-
yyy-

スコア4

title CHANGED
@@ -1,1 +1,1 @@
1
- ハイパーパラメータのサーチ結果が毎回変わる
1
+ ハイパーパラメータのサーチ結果が毎回変わる ramdomseedが効いていない
body CHANGED
@@ -1,5 +1,5 @@
1
1
  ランダムフォレストで回帰学習をかける際、optunaでハイパーパラメータを最適化しようと以下のように実行していますが、実行するたびに毎回違う値が出てしまいます。
2
- ramdamstateも固定しているのになぜだかわかりません。
2
+ randomstate、randomseedも固定しているのになぜだかわかりません。
3
3
 
4
4
 
5
5
  ```python
@@ -31,7 +31,7 @@
31
31
  -----hyper param
32
32
  max_depth = trial.suggest_int('max_depth', 3, 10)
33
33
  n_estimators = trial.suggest_int('n_estimators', 20, 100)
34
- randam_state=[0]
34
+ random_state=[0]
35
35
 
36
36
  modelbest = RFR(max_depth=max_depth,n_estimators=n_estimators,max_features='sqrt',n_jobs=-1,verbose=True)
37
37