# 泰勒展开及其应用

## 泰勒展开[1]

$g(x)=a_0+a_1(x-x_0)+a_2(x-x_0)^2+……+a_n(x-x_0)^n$

$g(x)\approx f(x_0)+\frac{f^1(x_0)}{1!}(x-x_0)+\frac{f^2(x_0)}{2!}(x-x_0)^2+……+\frac{f^n(x_0)}{n!}(x-x_0)^n$

## 应用举例

### 优化算法之牛顿法

$f(x)$$x_n$ 处二阶 taylor 展开, 有:

$f(x)\approx f(x_n)+f'(x_n)(x-x_n)+{1\over 2}f''(x_n)(x-x_n)^2 \\ f(x_n+\Delta x)\approx f(x_n)+f'(x_n)\Delta x+{1\over 2}f''(x_n)\Delta x^2$

${d f(x_n+\Delta x) \over d\Delta x}=f'(x_n)+f''(x_n)\Delta x=0 \\ \Longrightarrow \Delta x=-{f'(x_n)\over f''(x_n)} \\ x_{n+1}=x_n+\Delta x=x_n-[f''(x_n)]^{-1}f'(x_n)$

### 高斯核函数的推导证明[3]

$\|x-y\|^2=x^Tx+y^Ty-2x^Ty$
$K(x,y)=\exp(-{\|x-y\|^2\over 2\sigma^2})=\exp(-{x^Tx\over 2\sigma^2})\exp({x^Ty\over \sigma^2})\exp(-{y^Ty\over 2\sigma^2})$

$\exp({x^Ty\over \sigma^2})$进行泰勒展开,在$x^Ty=0$处:

$\exp({x^Ty\over \sigma^2})=\sum_{n=0}^{+\infty}{1\over n!}{(x^Ty)^n\over \sigma^{2n}}=\sum_{n=0}^{+\infty}{1\over \sqrt{n!}}{(x^T)^n\over \sigma^{n}}\cdot {1\over \sqrt{n!}}{y^n\over \sigma^{n}} \\ =\phi^T(x)\cdot\phi(y) \\ K(x,y)=\exp(-{x^Tx\over 2\sigma^2})\exp({x^Ty\over \sigma^2})\exp(-{y^Ty\over 2\sigma^2}) \\ =\exp(-{x^Tx\over 2\sigma^2})\phi^T(x)\cdot\phi(y) \exp(-{y^Ty\over 2\sigma^2}) \\ =\Phi^T(x)\cdot\Phi(y)$

### 高斯核为什么会把原始维度映射到无穷多维?

$e^{x} \approx 1 + x + \frac{x^{2}}{2!} + \frac{x^{3}}{3!} + ... + \frac{x^{n}}{n!}$

$\kappa \left( x_{1} , x_{2} \right) = e^{\left(- \frac{\left||x_{1} - x_{2} \right|| ^{2} }{2\sigma ^{2} } \right) } \\ = 1 + \left(- \frac{\left||x_{1} - x_{2} \right|| ^{2} }{2\sigma ^{2} } \right) + \frac{(-\frac{\left||x_{1} - x_{2} \right|| ^{2} }{2\sigma ^{2} })^{2} }{2!} + ... + \frac{(-\frac{\left||x_{1} - x_{2} \right|| ^{2} }{2\sigma ^{2} })^{3} }{3!} + ... + \frac{(-\frac{\left||x_{1} - x_{2} \right|| ^{2} }{2\sigma ^{2} })^{n} }{n!}$

posted @ 2019-08-27 10:05  康行天下  阅读(994)  评论(0编辑  收藏