我是vowpal wabbit的新手,所以对此有一些疑问.
我将数据集传递给vw并拟合模型并获得样本内预测,并使用-f保存模型.到现在为止还挺好.我知道如何使用模型并对不同的数据集进行预测.但我想知道如何为模型添加更多观察并更新它.
主要目标:使用一些数据块首先使vw在线学习,然后使用该模型预测一些数据.然后使用新数据更新模型.然后使用更新的数据来预测另一个新观察,这个过程应继续进行.
正如我所说,我是一个新手,所以请尽量原谅这个问题的微不足道
vw -i existing.model -f new.model more_observations.dat
Run Code Online (Sandbox Code Playgroud)
口诀:
-i 初始-f 最后您甚至可以使用相同的模型文件名-i并-f更新" 就地 ",因为它不是真正的就地.模型替换在运行结束时以原子方式发生(将临时文件重命名为最终文件),如以下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 +++
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
340 次 |
| 最近记录: |