度量学习方法 - KISSME

        KISSME(keep it simple and straightforward metric), 属于有监督的线性度量学习方法,本质上还是学习马氏距离中的矩阵M.


推导

        首先,认为对于样本对,它们之间的差异程度(dissimilar)可以通过似然比检验(likelihood ratio test)来观测,如下式所示:

        其中,H0假设该样本对为负样本对(不相似),H1假设该样本对为正样本对(相似)。值越大,H0假设越可能符合,样本差异程度大; 反之,越小,则样本更相似。为了使样本在特征空间中的实际位置不影响结果,我们用样本对的差分来代替,从而得到零均值的分布。公式重写如下:

        假设上式中概率密度分布函数为高斯分布(均值为0),则有:

        其中,为样本对标签,若样本对相似,则=1, 否则为0.  式中的协方差矩阵计算如下:


        这里原文中有一段话不太理解:The maximum likelihood estimate of the Gaussian is equivalent to minimizing the Mahalanobis distances from the mean in a least squares manner. This allows us to find respective relevant directions for the two independent sets.

         接下来,对上面高斯分布的似然比公式取对数,得到:

         去掉只提供偏置的常数项,化简得到:


        最终得到反映了对数似然比检验的属性的马氏距离(Mahalanobis distance)度量:

 

算法

       其中矩阵M的计算方法如下,首先,计算

        接着我们需要强制为半正定矩阵(为了满足度量可逆的特性),具体做法则是进行特征值分解,将小于等于0的特征值强行设置为很小的正数,再重构矩阵,即为马氏距离度量中的矩阵M.

相关matlab代码可参考 https://github.com/NEU-Gou/kernel-metric-learning-reid 中的KISSME部分。


参考文献

[1] Hirzer M. Large scale metric learning from equivalence constraints[C]// IEEE Conference on Computer Vision and Pattern Recognition. IEEE Computer Society, 2012:2288-2295.

[2] Xiong F, Gou M, Camps O, et al. Person Re-Identification Using Kernel-Based Metric Learning Methods[C]// European Conference on Computer Vision. Springer, Cham, 2014:1-16.


猜你喜欢

转载自blog.csdn.net/hyk_1996/article/details/79638556