定义
A function f:Rn→R is convex if domf is a convex set and if for all x, y∈domf, and θ with 0≤θ≤1, we have
f(θx+(1−θ)y)≤θf(x)+(1−θ)f(y)
严格下凸(strictly convex)函数:当 x=y,则不等号严格成立。
严格上凸(strictly concave)函数:−f 严格下凸。
为什么定义域要求是凸集,因为 θx+(1−θ)y 永远在定义域内。
扩展
It is often convenient to extend a convex function to all of Rn by defining its value to be ∞ outside its domain. If f is convex we define its extended-value extension f~:Rn→R∪{∞} by
f~(x)={f(x)∞x∈domfx∈/domf
The extension f~ is defined on all Rn, and takes values in R∪{∞}. We can recover the domain of the original function f from the extension f~ as domf={x∣f~(x)< ∞}.
The extension can simplify notation, since we do not need to explicitly describe the domain, or add the qualifier 'for all x∈domf ’ every time we refer to f(x). Consider, for example, the basic defining inequality (3.1). In terms of the extension f~, we can express it as: for 0<θ<1
f~(θx+(1−θ)y)≤θf~(x)+(1−θ)f~(y)
示性函数 Indicator
I~C(x)={0∞x∈Cx∈/C
扩展到比较小的数总有反例。
一阶条件
Suppose f is differentiable (i.e., its gradient ∇f exists at each point in domf, which is open). Then f is convex if and only if domf is convex and
f(y)≥f(x)+∇f(x)T(y−x)
holds for all x,y∈domf. This inequality is illustrated in figure 3.2.
如果 ∇f(x)=0,则是最小值点。也可以是最优解集。
一阶条件和定义等价
一阶条件推定义
∀x,y∈domfty+(1−t)x∈domft~y+(1−t~)x∈domf
一阶条件:
f(ty+(1−t)x)≥f(t~y+(1−t~)x)+∇f(t~y+(1−t~)x)T(ty+(1−t)x−t~y+(1−t~)x)=f(t~y+(1−t~)x)+∇f(t~y+(1−t~)x)T(y−x)(t−t~)
定义要求 f(ty+(1−t)x)≥tf(y)+(1−t)f(x)
定义 g(t)=f(ty+(1−t)x),g(t~)=f(t~y+(1−t~)x)
则
g′(t~)=∇f(t~y+(1−t~)x)T(y−x)
g(t)≥g(t~)+g′(t~)(t−t~)
则 f(x) 为凸。
二阶条件
若 f:Rn→R 二阶可微,则 f 为凸 ⇔ domf 为凸,∇2f(x)⪰0∀x∈domf。
但是 f 严格凸不能推出 ∇2f(x)≻0,例如 f(x)=x4。
二次函数
f:Rn→Rf(x)=21xTPx+qTx+r
一般要求 P∈Sn,q∈Rn,r∈R。
使用二阶条件:
∇2f(x)=P 只要求半正定。
例:f(x)=x21,f′′(x)=6x−4>0,但是定义域非凸。
仿射函数
f(x)=Ax+b,∇2f(x)=0
指数函数
f(x)=eax,x∈R
f′′(x)=a2eax
幂函数
f(x)=xa,x∈R++
∇2f(x)≥0,a≥1ora≤0;≤0,0≤a≤1
绝对值的幂函数
对数函数
f(x)=logx,x∈R++
f′′(x)=−x21<0
凹函数
负熵函数
f(x)=xlogx,x∈R++
(x+logx)′=logx+1,(xlogx)′′=x1>0
严格凸,凹凸性翻转
极小化负熵函数比较容易。
范数
Rn 空间的范数 p(x),x∈Rn。
满足三个性质:
- P(ax)=∣a∣P(x)
- P(x+y)≤P(x)+P(y)
- P(x)=0⇔x=0。
用原始定义
∀x,y∈Rn,∀0≤θ≤1
P(θx+(1−θ)y)≤P(θx)+P((1−θ)y)=θP(x)+(1−θ)P(y)
二范数:可以看做旋转抛物面。
零范数:
∣∣x∣∣0=非零元素个数
但是范数,也不是凸函数。
极大值函数
f(x)=max{x1,⋯,xn},x∈Rn
∀x,y∈Rn,∀0≤θ≤1
f(θx+(1−θ)y)=max{θxi+(1−θ)yi,i=1,⋯,n}≤θmax{xi,i=1,⋯,n}+(1−θ)max{yi,i=1,⋯,n}=θf(x)+(1−θ)f(y)
等号成立:极大值下标相同。
极大极小问题
xminymaxf(x,y)
log-sum-up 函数
f(x)=log(ex1+⋯+exn),x∈Rn
max{x1,⋯,xn}≤f(x)≤max{x1,⋯,xn}+logn
等号成立当 x1=⋯=xn。
逼近的函数也是凸函数。
Hessen 矩阵:
z=[ex1,⋯,exn]T
H=(1Tz)21((1Tz)diag(z)−zzT)
用定义。
VTKV=(1Tz)(VTdiag(z)V)−VTZZTV
=(∑zi)(∑Vi2zi)−(∑Vizi)2
柯西不等式
几何平均
f(x)=(x1+x2+⋯+xn)n1,x∈R++n
取等……
行列式的对数
f(x)=logdetx,domf=S++n
凹函数,可以把 x 看成标量。
当 n=1 时……
当 n>1 时,
g(t)=f(z+tv)=logdet(z+tv)=logdet(z21(I+tz−21vz21)z21)
logdetz+∑log(1+tλi)
λi 表示 z−21vz21 的特征值。
v⇒QΛQT,QQT=I。
det(I+tz−21vz−21)=det(QQT+tQΛQT)=det(Q(I+tΛ)QT)
g′′(t)≤0。