L2 Norm是向量一个L2模,是一个实数,也称L2范数,二范数
norm(x)=x12+x22+...+xn2norm(x) = \sqrt{x_1^2+x_2^2+...+x_n^2 }norm(x)=x12+x22+...+xn2
L2归一化,是对单个向量的各个元素做归一化的手段,使得向量x变换后的结果x'的L2 norm为1
1=norm(x′)=x12+x22+...+xn2norm(x)1 = norm(x')=\frac{\sqrt{x_1^2+x_2^2+...+x_n^2 }}{norm(x)}1=norm(x′)=norm(x)x12+x22+...+xn2 =x12+x22+...+xn2norm(x)2=\sqrt{\frac{x_1^2+x_2^2+...+x_n^2}{norm(x)^2}}=norm(x)2x12+x22+...+xn2 =(x1norm(x))2+(x2norm(x))2+...+(xnnorm(x))2=\sqrt{(\frac{x_1}{norm(x)})_2+(\frac{x_2}{norm(x)})_2+...+(\frac{x_n}{norm(x)})_2}=(norm(x)x1)2+(norm(x)x2)2+...+(norm(x)xn)2
即: xi′=xinorm(x)x'_i =\frac{x_i}{norm(x)}xi′=norm(x)xi
最后更新于6年前