rank问题目标是合理的排序。
最简单的是使用分类和回归来模拟,将每个url对应的特征和相关性打分作为样本进行学习(例如二分类),这属于pointwise方法,所选用模型例如Logistic regression,得分是一个0-1的概率。但这种方法没有考虑排序结果之间的相对关系。
为了考虑个体间相对关系,我们希望di>dj时,f(xi) > f(xj).这是pairwise的方法。
svm作为分类方法,拥有结构化风险最优的理论基础,实际应用中验证效果良好。
利用线性svm对rank问题求解,需要将样本变成同一个query下两个url的pair,样本对应特征变为两个样本差值。
对于特征是非线性的,需要特征预处理时进行shaping。
对于pair问题求解过程如下:
1.初始化w0(可以全为0)
2.for t=1 to T do
a)随机抽取pair(di,dj|di>dj)
b)w^t < -update(w^(t-1), xi-xj)
3.返回w参数
在随机抽样pair的时候,可以均匀抽样,也可以根据样本权重抽样,将惩罚因素融入其中。
参数更新最简单的是根据梯度直接更新:
w=w^(t-1)+η∇w=w^(t-1)+η(λw^(t1 )-(xi-xj ))
di>dj && 1>< w^(t-1), xi-xj>
η=1/λt
为了加快收敛,对w做scaling,||w||<1/√λ
ranksvm
最新推荐文章于 2023-04-24 09:51:23 发布