等式约束凸二次规划-拉格朗日乘子法1、算法公式2、python程序总结
一.算法公式
示例: pandas是为解决数据分析任务而创建的基于NumPy的工具。
二、python程序#创作者:口碑#地点:桂林#时间: 2021/11/1416336048 importmathimportnumpyasnp #函数式# fun=lambdax 3360 x [1] ^ c ) :IH=NP.linaLG.inv(h ) aha=NP.dot(NP.dot ) a、ih )、g=ih-NP.dot(NP.dot ) ) aih ) c=-iahax=NP.dot ) b ) # fun=0.5*x.T*H*x c.T*x return x,lamh=NP.array([2,- 2,0 ] ),[ 1](#print(a.t ) b=NP.array([4],[2] ) #print ) x,lam=quadratic_programmmmand ) )。
[1.95454545]
[0.13636364]]
lam=[[ 2.63636364]
[-1.36363636]]