不同的数据预处理对L1距离性能的影响

本文探讨了不同数据预处理步骤如何影响使用L1距离的最近邻分类器的性能。通过分析减去均值、减去像素均值、除以标准差、像素级标准化和坐标轴旋转等操作,得出结论:平移和归一化操作不会显著改变性能,而坐标旋转会导致性能变化。
问题由来

这个问题来自于CS231n Assignment1 Q1 inlineQuestion 2 ,原问题描述如下
We can also use other distance metrics such as L1 distance.
For pixel values pij(k)p_{ij}^{(k)}pij(k) at location (i,j)(i,j)(i,j) of some image IkI_kIk,

the mean μ\muμ across all pixels over all images is μ=1nhw∑k=1n∑i=1h∑j=1wpij(k)\mu=\frac{1}{nhw}\sum_{k=1}^n\sum_{i=1}^{h}\sum_{j=1}^{w}p_{ij}^{(k)}μ=nhw1k=1ni=1hj=1wpij(k)
And the pixel-wise mean μij\mu_{ij}μij across all images is
μij=1n∑k=1npij(k).\mu_{ij}=\frac{1}{n}\sum_{k=1}^np_{ij}^{(k)}.μij=n1k=1npij(k).
The general standard deviation σ\sigmaσ and pixel-wise standard deviation σij\sigma_{ij}σij is defined similarly.

Which of the following preprocessing steps will not change the performance of a Nearest Neighbor classifier that uses L1 distance? Select all that apply.

  1. Subtracting the mean μ\muμ (p~ij(k)=pij(k)−μ\tilde{p}_{ij}^{(k)}=p_{ij}^{(k)}-\mup~ij(k)=pij(k)μ.)
  2. Subtracting the per pixel mean μij\mu_{ij}μij (p~ij(k)=pij(k)−μij\tilde{p}_{ij}^{(k)}=p_{ij}^{(k)}-\mu_{ij}p~ij(k)=pij(k)μij.)
  3. Subtracting the mean μ\muμ and dividing by the standard deviation σ\sigmaσ.
  4. Subtracting the pixel-wise mean μij\mu_{ij}μij and dividing by the pixel-wise standard deviation σij\sigma_{ij}σij.
  5. Rotating the coordinate axes of the data.

我的思路是这样的:
使用L1 distance,P1=(x1,x2)P_1 = (x_1,x_2)P1=(x1,x

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值