Vowpal Wabbit: obtaining a readable_model when in --daemon mode

╄→尐↘猪︶ㄣ 提交于 2020-01-17 12:41:13

问题


I am trying to stream my data to vw in --daemon mode, and would like to obtain at the end the value of the coefficients for each variable. Therefore I'd like vw in --daemon mode to either: - send me back the current value of the coefficients for each line of data I send. - Write the resulting model in the "--readable_model" format.

I know about the dummy example trick save_namemodel | ... to get vw in daemon mode to save the model to a given file, but it isn't enough as I can't access the coefficient values from that file.

Any idea on how I could solve my problem ?


回答1:


Unfortunately, on-demand saving of readable models isn't currently supported in the code but it shouldn't be too hard to add. Open source software is there for users to improve according to their needs. You may open a issue on github, or better, contribute the change.

See: this code line where only the binary regressor is saved using save_predictor(). One could envision a "rsave" or "saver" tag/command to store the regressor in readable form as is being done in this code line

As a work-around you may call vw with --audit and parse every audit line for the feature names and their current weights but this would:

  • make vw much slower
  • require parsing every line to get the values rather than on demand


来源:https://stackoverflow.com/questions/31120834/vowpal-wabbit-obtaining-a-readable-model-when-in-daemon-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!