且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何从R中知道完成了多少个深度学习时代?

更新时间:2023-10-27 18:55:22

如果您的模型称为m,则只需获取训练的纪元数:last(m@model$scoring_history$epochs)

If your model is called m, then to get just the number of epochs trained: last(m@model$scoring_history$epochs)

要查看还有哪些其他信息(实际上是您可以在Flow界面中看到的所有信息)以及如何访问它,请使用str(m)

To see what other information is available (which is literally everything you can see in the Flow interface) and how to access it, use str(m)

还请注意以下命令:summary(m)除了print(m)显示的内容外,它还添加了此部分(用于深度学习模型):

Also be aware of this command: summary(m) In addition to what is shown with print(m) it adds this section (for a deeplearning model):

Scoring History: 
            timestamp   duration training_speed    epochs iterations       samples training_MSE training_deviance training_r2
1 2016-04-14 11:35:46  0.000 sec                  0.00000          0      0.000000
2 2016-04-14 11:35:52  5.218 sec 15139 rows/sec  10.00000          1  77150.000000      0.00000           0.00000     0.07884
...
7 2016-04-14 11:36:18 31.346 sec 25056 rows/sec 100.00000         10 771500.000000      0.00000           0.00000     0.72245

即您可以通过查看最后一行来查看纪元总数.

I.e. You can see total number of epochs by looking at the last row.

顺便说一句,当应用于数据 frame 时,这与h2o的summary()命令不同;在这种情况下,它的行为类似于R的内置摘要功能,并显示数据框中每一列的统计信息.

BTW, this is different to h2o's summary() command when applied to a data frame; in that case it behaves like R's built-in summary function, and shows statistics on each column in the data frame.