zoukankan      html  css  js  c++  java
  • 证明最优化loss function+penalty等价于最优化带限制条件的loss function

    Equivalence of constrained and unconstrained form for lasso

    Problem 1 The unconstrained form of lasso

    [operatorname{min}_{eta}|y-X eta|_{2}^{2}+lambda|eta|_{1} ag{1} ]

    Suppose we solve Problem 1 for a given (lambda) and obtain its solution (eta_{ ext{problem1}}^*(lambda)).

    Problem 2 The constrained form of lasso

    [operatorname{min}_{eta}|Y-X eta|_{2}^{2} ]

    [s.t. {|eta|_{1} leq s} ]

    We can rewrite the constrained form into unconstrained form using Lagrangian mutiplier method.

    The unconstrained form for the problem is given by:

    [operatorname{min}_{eta,v}|Y-X eta|_{2}^{2}+vleft(|eta|_{1}-s ight) ag{2} ]

    Since the objective and the constraints are convex, so we have the pair ((eta^*,v^*)) is primal-dual optimal if and only if it is a saddle-point of the Lagrangian.

    [operatorname{min}_{eta}operatorname{max}_{v}|Y-X eta|_{2}^{2}+vleft(|eta|_{1}-s ight) =operatorname{max}_{v}operatorname{min}_{eta}|Y-X eta|_{2}^{2}+vleft(|eta|_{1}-s ight) ]

    First we solve the

    [operatorname{min}_{eta}|Y-X eta|_{2}^{2}+vleft(|eta|_{1}-s ight) ]

    The form is the same with eq(1), so we have the same solution with Problem 1, i.e. (eta_{ ext{problem2}}^*=eta_{ ext{problem1}}^*(v))

    Then we solve

    [operatorname{max}_{v}|Y-X eta^*(v)|_{2}^{2}+vleft(|eta^*(v)|_{1}-s ight) ]

    The solution is (v^*).

    Finally, we have that (eta^*_{ ext{problem2}}=eta_{ ext{problem1}}^*(v^*))

    Therefore,if we let (lambda) in Problem 1 be (v^*), the solution in Problem 1 is (eta_{ ext{problem1}}^*=eta_{ ext{problem1}}^*(lambda)=eta_{ ext{problem1}}^*(v^*)), this is the same with solution in Problem 2.

    So the two forms are equivalent.

    Equivalence of constrained and unconstrained form for Ridge Regression

    Problem 1 The unconstrained form of ridge regression

    [operatorname{min}_{eta}|y-X eta|_{2}^{2}+lambda|eta|_{2}^{2} ag{3} ]

    Suppose we solve Problem 3 using F.O.C for a given (lambda) and obtain its solution (eta^*(lambda)).

    Problem 2 The constrained form of ridge regression

    [operatorname{min}_{eta}|Y-X eta|_{2}^{2} ]

    [s.t. {|eta|_{2}^2 leq s} ]

    We can rewrite the constrained form into unconstrained form using Lagrangian mutiplier method.

    The unconstrained form for the problem is given by:

    [operatorname{min}_{eta,v}|Y-X eta|_{2}^{2}+vleft(|eta|_{2}^{2}-s ight) ag{4} ]

    The first KKT condition (stationarity) says that the gradient with respect to (eta) of the lagrangian equals to 0. Since s is independent on (eta), so solving for the derivative of eq (3) is thus equivalent to solving for the derivate of eq (4) when (lambda=v) .

    The second KKT condition (complementarity) says that

    [vleft(|eta|_{2}^{2}-s ight)=0 ]

    Let (s=|eta^*(lambda)|^2), then we can find that (v^*=lambda) and (eta^*=eta^*(lambda)) satisfy the KKT conditions for Problem 2, so they are the solution of Problem 2, which is the same as the solution in Problem 1.

    So the two forms are equivalent.

    本文为跑得飞快的凤凰花原创,如需转载,请标明出处~
  • 相关阅读:
    带结点与不带结点用头插法和尾插法创建单链表
    高中数学教资面试记录
    学习爬虫——test1——模拟浏览器去访问网站
    解决centos虚拟机中使用virt-manager创建虚拟机遇到的镜像导入问题
    pycharm更改背景颜色
    控制函数调用的流程
    简单的获取list的下标
    种一棵树的时间,不是以前,也不是未来的某一天,而是现在。
    将八位教师随机分配到三个办公室——python
    使用tomcat部署idea项目方法(1)
  • 原文地址:https://www.cnblogs.com/zzqingwenn/p/12668264.html
Copyright © 2011-2022 走看看