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

質問編集履歴

1

plotのコードが抜けていました。

2020/05/14 17:21

投稿

egpt
egpt

スコア25

title CHANGED
File without changes
body CHANGED
@@ -32,4 +32,16 @@
32
32
  # 一定ラウンド回しても改善が見込めない場合は学習を打ち切る
33
33
  early_stopping_rounds=1000
34
34
  )
35
+
36
+ plt.figure(figsize=(10, 5))
37
+ train_metric = evals_result['train']['rmse']
38
+ plt.plot(train_metric, label='train rmse')
39
+ eval_metric = evals_result['eval']['rmse']
40
+ plt.plot(eval_metric, label='eval rmse')
41
+ plt.grid()
42
+ plt.legend()
43
+ plt.xlabel('rounds')
44
+ plt.ylabel('rmse')
45
+ plt.ylim(5, 40)
46
+ plt.show()
35
47
  ```