To derive the dual form of the constrained optimization problem (5.24), we plug into the Lagrangian the definition of in terms of the dual variables (5.26) and apply the constraint (5.27). This yields
Remarkably, we find that the objective function is no different than in the separable
case:
However, here, in addition to , we must impose the constraint on the Lagrange variables . In view of (5.28), this is equivalent to . This leads to the following dual optimization problem for SVMs in the non-separable case, which only differs from that of the separable case (5.14) by the constraints :
因此,我们之前关于优化问题(5.14)的评论也适用于(5.33)。特别是,目标函数是凹的且可无限次微分,(5.33)等价于一个凸二次规划问题。该问题等价于原问题(5.24)。
对偶问题(5.33)的解 可以直接用来确定 SVMs 返回的假设,使用方程(5.26):
此外, 可以从任意位于边缘超平面上的支持向量 中获得,即任意满足 的向量 。对于这样的支持向量,
因此
与可分情况一样,对偶优化问题(5.33)以及表达式(5.34)和(5.35)显示了 SVMs 的一个重要性质:假设解仅依赖于向量之间的内积,而不是直接依赖于向量本身。这一事实可以用来将 SVMs 扩展到定义非线性决策边界,我们将在第6章中看到。