本文主要是介绍20240506——凌晨四点敲的latex公式,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
ρ ≥ 1 \bm{\rho \ge 1} ρ≥1为多项式函数的次数
σ > 1 \bm{\sigma \gt 1} σ>1为多项式函数的次数
σ > 0 , θ < 0 \bm{\sigma \gt 0,\theta \lt 0} σ>0,θ<0
K ( x , z ) = x ⋅ z \bm{K (x,z) = x·z} K(x,z)=x⋅z
K ( x , z ) = ( x ⋅ z + 1 ) p \bm{K (x,z) = (x·z+1)^p} K(x,z)=(x⋅z+1)p
K ( x , z ) = e x p ( − ∥ x − z ∥ 2 2 σ 2 ) \bm{K (x,z) = exp(- \cfrac{\Vert x-z\Vert ^2}{2\sigma ^2} )} K(x,z)=exp(−2σ2∥x−z∥2)
K ( x , z ) = t a n h ( δ ( x ⋅ z + c ) ) \bm{K (x,z) = tanh(\delta (x·z+c))} K(x,z)=tanh(δ(x⋅z+c))
线性可分支持向量机算法:
1.给定训练集 S = { ( x 1 , y 1 ) , ( x 2 , y 2 ) , ⋅ ⋅ ⋅ ( x n , y n ) } , i = 1 , 2 , 3 ⋅ ⋅ ⋅ N , x i ∈ R n , y i ∈ { 1 , 2 , 3 , 4 } \bm{ S = \{ (x_1,y_1),(x_2,y_2),···(x_n,y_n) \},i = 1,2,3···N,x_i \in R^n ,y_i \in\{ 1,2,3,4 \}} S={(x1,y1),(x2,y2),⋅⋅⋅(xn,yn)},i=1,2,3⋅⋅⋅N,xi∈Rn,yi∈{1,2,3,4} ,其中 N N N为样本数目, x i \bm{x_i} xi为第 i i i个特征向量, y i y_i yi为 x i x_i xi的标记,假定 y i = 1 y_i = 1 yi=1时候为正例,故当 y i = 1 y_i = 1 yi=1时, x i x_i xi为正例, y i ≠ 1 y_i \neq1 yi=1时, x i x_i xi为负例,循环假定四次,可将一个四分类问题转化成四个二分类问题。
2.构造最优化问题:
m i n 1 2 ∥ w ∥ 2 \bm{min \quad \cfrac{1}{2} \Vert w \Vert ^ 2} min21∥w∥2
s . t . y i ( w x i + b ) − 1 ≥ 0 \bm{s.t. \quad y_i(wx_i+b)-1 \ge 0 } s.t.yi(wxi+b)−1≥0
求得最优解为: w ∗ , b ∗ w^*,b^* w∗,b∗
3.由此可得到分离超平面: w ∗ ⋅ x + b ∗ = 0 \bm{w^*·x+b^* = 0} w∗⋅x+b∗=0
4.构造分类决策函数: f ( x ) = s i g n ( w ∗ ⋅ x + b ∗ ) \bm{f(x) = sign(w^*·x+b^*)} f(x)=sign(w∗⋅x+b∗),其中 s i g n \bm {sign} sign 为符号函数,
s i g n ( x ) = { + 1 , x ≥ 0 − 1 , x < 0 \bm{sign(x) = \begin{cases} +1,& \text{x} \ge 0\\-1,& \text{x}\lt0 \end{cases} } sign(x)={+1,−1,x≥0x<0
由于原始最优化问题不便于求解,因此引入其对偶算法,容易证明原始问题与对偶问题有相同的最
优解。
对偶算法:
1.给定训练集 S = { ( x 1 , y 1 ) , ( x 2 , y 2 ) , ⋅ ⋅ ⋅ ( x n , y n ) } , i = 1 , 2 , 3 ⋅ ⋅ ⋅ N , x i ∈ R n , y i ∈ { 1 , 2 , 3 , 4 } \bm{ S = \{ (x_1,y_1),(x_2,y_2),···(x_n,y_n) \},i = 1,2,3···N,x_i \in R^n ,y_i \in\{ 1,2,3,4 \}} S={(x1,y1),(x2,y2),⋅⋅⋅(xn,yn)},i=1,2,3⋅⋅⋅N,xi∈Rn,yi∈{1,2,3,4}
2.构造最优问题:
m i n 1 2 ∑ i = 1 N ∑ j = 1 N α i α j y i y j ( x i ⋅ x j ) − ∑ i = 1 N α i \bm{min \quad \cfrac{1}{2} \sum_{i=1}^N \sum_{j=1}^N \alpha_i \alpha_j y_iy_j(x_i·x_j)- \sum_{i=1}^N \alpha_i} min21∑i=1N∑j=1Nαiαjyiyj(xi⋅xj)−∑i=1Nαi
s . t . ∑ i = 1 N α i y i = 0 , α i ≥ 0 , i = 1 , 2 ⋅ ⋅ ⋅ , N \bm{s.t. \quad \sum_{i=1}^N \alpha_iy_i=0,\qquad \alpha_i \ge0,i=1,2···,N} s.t.∑i=1Nαiyi=0,αi≥0,i=1,2⋅⋅⋅,N
3.计算
w ∗ = ∑ i = 1 N α i ∗ y i x i \bm{w^* = \sum_{i=1}^N \alpha_i ^* y_i x_i} w∗=∑i=1Nαi∗yixi
选择 α ∗ \bm{\alpha^*} α∗的一个正分量 α j ≥ 0 \bm{\alpha_j \ge0} αj≥0,计算
b ∗ = y j − ∑ i = 1 N α i ∗ y i ( x i ⋅ x j ) \bm{b^* = y_j-\sum_{i=1}^N\alpha_i^*y_i(x_i·x_j)} b∗=yj−∑i=1Nαi∗yi(xi⋅xj)
4.由此得到超平面:
w ∗ ⋅ x + b ∗ = 0 \bm{w^*·x + b^* = 0} w∗⋅x+b∗=0
5.构造分类决策函数: f ( x ) = s i g n ( w ∗ ⋅ x + b ∗ ) \bm{f(x) =sign(w^*·x +b^*)} f(x)=sign(w∗⋅x+b∗)
2 ∥ w ∥ \bm{\cfrac{2}{\Vert w \Vert}} ∥w∥2
w = ∑ i = 1 N α i y i x i \bm{w = \sum_{i=1}^N \alpha_iy_ix_i} w=∑i=1Nαiyixi
∥ w ∥ 2 \bm{\Vert w \Vert ^2} ∥w∥2
x i j \bm{x_{ij}} xij
∑ i = 1 N ∂ ∥ w ∥ 2 ∂ x i j = γ ∣ w j ∣ \bm{\sum_{i=1}^N \cfrac{\partial \Vert w \Vert^2}{\partial x_{ij} } = \gamma \vert w_j \vert} ∑i=1N∂xij∂∥w∥2=γ∣wj∣
v j = w j ∗ 2 ∑ j = 1 k w j ∗ 2 \bm{v_j = \cfrac{w_j^{*2} }{\sum _{j=1}^k w_j^{*2}} } vj=∑j=1kwj∗2wj∗2
这篇关于20240506——凌晨四点敲的latex公式的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!