我有一个数据集并且想要找到参数m,以使其最小化和k ∑ i = 1 | m − x i | 。 那是
我有一个数据集并且想要找到参数m,以使其最小化和k ∑ i = 1 | m − x i | 。 那是
Answers:
证明这一点的过分凸分析方法只是取次梯度。实际上,这等效于其他一些涉及斜率的答案中使用的推理。
优化问题是凸的(因为目标是凸的并且没有约束。)而且, 是
-1如果
[-1,1]如果
+1,如果 。
Since a convex function is minimized if and only if it's subgradient contains zero, and the subgradient of a sum of convex functions is the (set) sum of the subgradients, you get that 0 is in the subgradient if and only if is the median of .
We're basically after:
One should notice that (Being more rigorous would say it is a Sub Gradient of the non smooth Norm function).
Hence, deriving the sum above yields .
This equals to zero only when the number of positive items equals the number of negative which happens when .
One should notice that the median
of a discrete group is not uniquely defined.
Moreover, it is not necessarily an item within the group.