如何让 vowpal wabbit 使用更多的观察

How to make vowpal wabbit use more observations

我是 vowpal wabbit 的新手,所以有一些问题。

我将数据集传递给大众汽车并拟合模型并获得样本内预测,并使用 -f 保存模型。到目前为止,一切都很好。我知道如何使用模型并对不同的数据集进行预测。但我想知道如何向模型添加更多观察并更新它。

Main Objective : 使用一些数据块首先让 vw 在线学习,然后使用该模型预测一些数据。然后使用新数据更新模型。然后使用更新的数据来预测另一个新的观察结果,这个过程应该继续下去。

正如我所说的,我是新手,所以请尽量原谅问题的琐碎

vw -i existing.model -f new.model more_observations.dat

助记词:

  • -i初始
  • -f 决赛

您甚至可以在 -i-f 中使用相同的模型文件名来更新“in-place”,因为它不是真正的 就地。模型替换以原子方式发生在 运行 的末尾(将临时文件重命名为最终文件),如以下 strace 输出(添加了注释)所示:

$ strace -e open,close,rename vw --quiet -i zz.model -f zz.model f20-315.tt.gz
# loading the initial (-i zz.model) model into memory
open("zz.model", O_RDONLY)              = 3
# done loading, so we can close it
close(3)                                = 0
# Now reading the data-set and learning in memory
open("f20-315.tt.gz", O_RDONLY)         = 3
# data read complete. write the updated model into a temporary file
open("zz.model.writing", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
close(4)                                = 0
# and rename atomically to the final (-f zz.model) model file 
rename("zz.model.writing", "zz.model")  = 0
...
close(4)                                = 0
close(3)                                = 0
+++ exited with 0 +++