多项式核函数相关推导

定义 x = ( x 1 , x 2 , … , x n ) T ∈ R n x=(x_1,x_2,\dots,x_n)^T \in R^n x=(x1,x2,,xn)TRn,则称乘积 x j 1 x j 2 … x j d x_{j_1}x_{j_2}\dots x_{j_d} xj1xj2xjd x x x的一个 d d d阶多项式,其中 j 1 , j 2 , … , j d ∈ { 1 , 2 , … , n } j_1,j_2,\dots,j_d \in \{1,2,\dots,n\} j1,j2,,jd{1,2,,n}

有序齐次多项式

  考虑二维空间( x ∈ R 2 x \in R^2 xR2)的模式, x = ( x 1 , x 2 ) T x = (x_1,x_2)^T x=(x1,x2)T,其所有的二阶单项式为 x i 2 , x 2 2 , x 1 x 2 , x 2 x 1 x_i^2,x_2^2,x_1x_2,x_2x_1 xi2,x22,x1x2,x2x1 为有序单项式。

C 2 ( x ) = ( x 1 2 , x 2 2 , x 1 x 2 , x 2 x 1 ) T C_2(x)=(x_1^2,x_2^2,x_1x_2,x_2x_1)^T C2(x)=(x12,x22,x1x2,x2x1)T
C d ( x ) = ( x j 1 x j 2 … x j d ∣ j 1 , j 2 , … , j d ∈ { 1 , 2 , … , n } ) T C_d(x)=(x_{j_1}x_{j_2}\dots x_{j_d}|_{j_1,j_2,\dots,j_d \in \{1,2,\dots,n\}})^T Cd(x)=(xj1xj2xjdj1,j2,,jd{1,2,,n})T

1、二次项推导

令 x = ( x 1 , x 2 ) T , y = ( y 1 , y 2 ) T 令 x=(x_1,x_2)^T,y=(y_1,y_2)^T x=(x1,x2)T,y=(y1,y2)T
C 2 ( x ) ⋅ C 2 ( y ) = ( x 1 2 , x 2 2 , x 1 x 2 , x 2 x 1 ) T ⋅ ( y 1 2 , y 2 2 , y 1 y 2 , y 2 y 1 ) T = x 1 2 y 1 2 + x 2 2 y 2 2 + x 1 x 2 y 1 y 2 + x 2 x 1 y 2 y 1 = ( x ⋅ y ) 2 \begin{aligned} C_2(x)·C_2(y) &=(x_1^2,x_2^2,x_1x_2,x_2x_1)^T · (y_1^2,y_2^2,y_1y_2,y_2y_1)^T\\ &=x_1^2y_1^2+x_2^2y_2^2+x_1x_2y_1y_2+x_2x_1y_2y_1\\ &=(x·y)^2 \end{aligned} C2(x)C2(y)=(x12,x22,x1x2,x2x1)T(y12,y22,y1y2,y2y1)T=x12y12+x22y22+x1x2y1y2+x2x1y2y1=(xy)2

2、多次幂推导

令 x = ( x j 1 , x j 2 , … , x j d ∣ j 1 , j 2 , … , j d ∈ { 1 , 2 , … , n } ) T 令 x=(x_{j_1},x_{j_2},\dots,x_{j_d}|_{j_1,j_2,\dots,j_d \in \{1,2,\dots,n\}})^T x=(xj1,xj2,,xjdj1,j2,,jd{1,2,,n})T
y = ( y j 1 , y j 2 , … , y j d ∣ j 1 , j 2 , … , j d ∈ { 1 , 2 , … , n } ) T y=(y_{j_1},y_{j_2},\dots,y_{j_d}|_{j_1,j_2,\dots,j_d \in \{1,2,\dots,n\}})^T y=(yj1,yj2,,yjdj1,j2,,jd{1,2,,n})T
C d ( x ) ⋅ C d ( y ) = ( x j 1 , x j 2 , … , x j d ∣ j 1 , j 2 , … , j d ∈ { 1 , 2 , … , n } ) T ⋅ ( y j 1 , y j 2 , … , y j d ∣ j 1 , j 2 , … , j d ∈ { 1 , 2 , … , n } ) T = ∑ j 1 = 1 n ⋯ ∑ j d = 1 n x j 1 … x j d ⋅ y j 1 … y j d = ∑ j 1 = 1 n x j 1 y j 1 ⋯ ∑ j d = 1 n x j d y j d = ( ∑ j = 1 n x i y i ) d = ( x ⋅ y ) d \begin{aligned} C_d(x)·C_d(y) &=(x_{j_1},x_{j_2},\dots,x_{j_d}|_{j_1,j_2,\dots,j_d \in \{1,2,\dots,n\}})^T · (y_{j_1},y_{j_2},\dots,y_{j_d}|_{j_1,j_2,\dots,j_d \in \{1,2,\dots,n\}})^T\\ &=\sum_{j_1=1}^n\dots\sum_{j_d=1}^n x_{j_1}\dots x_{j_d} · y_{j_1}\dots y_{j_d}\\ &=\sum_{j_1=1}^n x_{j_1}y_{j_1} \dots \sum_{j_d=1}^n x_{j_d}y_{j_d}\\ &=(\sum_{j=1}^nx_iy_i)^d=(x·y)^d \end{aligned} Cd(x)Cd(y)=(xj1,xj2,,xjdj1,j2,,jd{1,2,,n})T(yj1,yj2,,yjdj1,j2,,jd{1,2,,n})T=j1=1njd=1nxj1xjdyj1yjd=j1=1nxj1yj1jd=1nxjdyjd=(j=1nxiyi)d=(xy)d

你可能感兴趣的:(多项式核函数相关推导)