优化/数学规划
Optimization/Mathematical Programming
从一个可行解的集合中,寻找出最优的元素
任何优化问题都可以写成如下形式
m
i
n
i
m
i
z
e
  
f
o
(
x
)
minimize \;f_o(x)
minimizefo(x)
s
u
b
j
e
c
t
  
t
o
    
f
i
(
x
)
≤
b
i
,
  
i
=
1..
m
subject \; to\;\; f_i(x) \leq b_i,\;i=1..m
subjecttofi(x)≤bi,i=1..m
X
=
[
x
i
,
.
.
.
,
x
n
]
T
O
p
t
i
m
i
z
a
t
i
o
n
  
V
a
r
i
a
b
l
e
X=[x_i,...,x_n]^T\quad Optimization\;Variable
X=[xi,...,xn]TOptimizationVariable
f
o
:
R
n
↦
R
o
b
j
e
c
t
i
v
e
  
f
u
n
c
t
i
o
n
f_o:R^n \mapsto R \quad objective\;function
fo:Rn↦Robjectivefunction
f
i
:
:
R
n
↦
R
i
n
e
q
u
a
l
i
t
y
  
c
o
n
s
t
r
a
c
t
f_i::R^n \mapsto R \quad inequality\;constract
fi::Rn↦Rinequalityconstract
目标找到最优
X
∗
X^*
X∗
X
∗
o
p
t
i
m
a
l
  
⟺
  
∀
z
,
z
∈
{
f
i
(
z
)
≤
b
i
,
i
=
1
,
.
.
m
}
feasibleset
X^* optimal \iff \forall z,z\in \lbrace f_i(z) \leq b_i,i=1,..m \rbrace \quad \text{feasibleset}
X∗optimal⟺∀z,z∈{fi(z)≤bi,i=1,..m}feasibleset
f
o
(
z
)
≥
f
o
(
x
∗
)
f_o(z) \geq f_o(x^*)
fo(z)≥fo(x∗)
数据拟合问题
把离散的点拟合成一条线
y
=
a
x
2
+
b
x
+
c
y=ax^2+bx+c
y=ax2+bx+c
最小二乘准则
目标:
m
i
n
ϵ
1
2
+
.
.
.
+
ϵ
n
2
\quad min\quad \epsilon_1^2+...+\epsilon_n^2
minϵ12+...+ϵn2
ϵ
i
=
y
i
−
(
a
x
i
2
+
b
x
i
+
c
)
;
i
=
1
,
.
.
.
,
n
\epsilon_i=y_i-(ax_i^2+bx_i+c);i=1,...,n
ϵi=yi−(axi2+bxi+c);i=1,...,n
假设我们限定c一定大于0,就变成了有约束的优化问题