拉格朗日乘數 ( Lagrange Multiplie )
拉格朗日乘數是用來解最佳化的一種方法
簡單來說,當我今天有一函數 和一個限制條件
要求滿足 條件在 的極值,也可以看成是求 , 相交面的極值,就可用拉格朗日乘數求解
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
1. 求解方法
要求出兩函數相交的極值,就必須先找出兩者之間的關係
假設兩函數在相交的切線上為以下函數
對兩式子做偏微分 ( 這邊假設用 x )
可以得出 分別為 的 倍 ( 未知 )
最後寫成下式
通常又會該寫成下式, 會因函數改寫而正負不同,但就是為一常數
利用以上兩式關係,就可求出在 限制下 的最小值
也可以很容易用幾何關係看出
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
之後進行求解步驟如下
- 利用關係式求出
- 代回 求出函數極值
2. KKT ( Karush-Kuhn-Tucker )
如果將約束條件改為
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
將範圍限制在 內部,而非 交點上
就會將原來的 Lagrange 乘數推廣到多個條件的約束
3. reference
Lagrange乘數 ( CUSTCourses )
線代啟示錄-Karush-Kuhn-Tucker (KKT) 條件
机器学习中的数学——拉格朗日乘子法(一)
机器学习中的数学——拉格朗日乘子法(二) KKT