使用 Vowpal Wabbit 时计算 AUC [英] Calculating AUC when using Vowpal Wabbit

查看:33
本文介绍了使用 Vowpal Wabbit 时计算 AUC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论如何可以在 Vowpal Wabbit 中计算 AUC 吗?

Is there anyway to compute AUC within Vowpal Wabbit?

我使用 Vowpal Wabbit 的原因之一是数据文件很大.我可以使用 Vowpal Wabbit 的输出计算 Vowpal Wabbit 环境之外的 AUC,但如果数据文件很大,这可能会出现问题.

One of the reasons I am using Vowpal Wabbit is the large size of the data file. I can calculate the AUC outside of the Vowpal Wabbit environment using the output of Vowpal Wabbit but this might be problematic if the data file is large.

推荐答案

目前,大众无法报告 AUC.更糟糕的是,它不能直接针对 AUC 进行优化.优化 AUC 与在线学习不兼容,但有一些适合优化的 AUC 近似值.

Currently, VW cannot report AUC. What is worse, it cannot optimize directly for AUC. Optimizing for AUC is not compatible with online learning, but there are some approximations of AUC suitable for optimizing.

关于您的问题,您不需要将带有原始预测的中间文件存储在磁盘上.您可以将其直接通过管道传输到外部评估工具(在本例中为 perf):

Concerning your question, you don't need to store the intermediate file with raw predictions on disk. You can pipe it directly to the external evaluation tool (perf in this case):

vw -d test.data -t -i model.vw -r /dev/stdout | perf -roc -files gold /dev/stdin

John Langford 确认一般可以通过改变误报和误报的比率来优化 AUC负损失.在大众中,这意味着为正例和负例设置不同的重要性权重.您需要使用保持集(或交叉验证,或一次性学习的渐进验证损失)来调整最佳权重.

John Langford confirmed that AUC can generally be optimized by changing the ratio of false positive and false negative loss. In VW, this means setting a different importance weight for positive and negative examples. You need to tune the optimal weight using a hold out set (or cross validation, or progressive validation loss for one-pass learning).

这篇关于使用 Vowpal Wabbit 时计算 AUC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆