# 傅里叶变换

## 傅里叶变换

* [返回顶层目录](https://luweikxy.gitbook.io/machine-learning-notes/summary#目录)
* [返回上层目录](https://luweikxy.gitbook.io/machine-learning-notes/calculus)
* [傅里叶变换的直观理解](#傅里叶变换的直观理解)
  * [直观理解之一：从相似度角度理解傅里叶变换](#直观理解之一：从相似度角度理解傅里叶变换)

重要：

[拉普拉斯变换的物理意义是什么？](https://www.zhihu.com/question/22102732/answer/290339137?group_id=934197907310129152#comment-381616429)

<https://www.zhihu.com/question/22102732/answer/369089156>

## 傅里叶变换的直观理解

### 直观理解之一：从相似度角度理解傅里叶变换

**声明：这个理解源自邹博老师的**[**《机器学习》**](http://www.chinahadoop.cn/course/982/learn#lesson/18658)**授课视频。**

先介绍**相似度**的概念。

两向量$A$和$B$，如下图所示，它们如果重合，则完全相似，若垂直，则完全不相似，所以，它们之间的夹角$\theta$的余弦$cos(\theta)$就反映了向量$A$和$B$之间的相似度，若两向量重合则为1，若垂直则为0。

![vectorAB](https://3298324061-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpO5sn2FY1C9esHFJmo%2F-LpO5t6XJGnSXrbsZ_UC%2F-LpO5zzJsqDmgWyakUph%2FvectorAB.jpg?generation=1569158071962434\&alt=media)

而$cos(\theta)=\frac{A\cdot B}{|A||B|}$，对于多维向量，假设$A = \[1, 3, 7, 9]^{T}$，$B = \[-4, 9, 7, -3]^{T}$。我们把不同维度依次排开在$x$轴上，$y$轴是不同维度对应的向量坐标值，则$A$、$B$向量如下图所示：

![vectorA](https://3298324061-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpO5sn2FY1C9esHFJmo%2F-LpO5t6XJGnSXrbsZ_UC%2F-LpO5zzLYHvpZtW8bcGs%2FvectorA.jpg?generation=1569158079076857\&alt=media) ![vectorB](https://3298324061-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LpO5sn2FY1C9esHFJmo%2F-LpO5t6XJGnSXrbsZ_UC%2F-LpO5zzNYBPqwO7uS4gm%2FvectorB.jpg?generation=1569158071971047\&alt=media)

则向量$A$和向量$B$的相似度为$A\cdot B = \sum\_{i=1}^{4}A\_i\cdot B\_i$。注：这里忽略了向量模的大小，因为这里并不追求绝对相似度，之后不再就此注解。

那么对于无穷维向量(无穷维向量其实就是普通的单变量实数函数)，如$f(x)$、$g(x)$等。令无穷维向量$A = f(x)$、$B = g(x)$。那么无穷维向量$A$、$B$之间的相似度就是

$$
A\cdot B = \int f(x)\cdot g(x)dx
$$

上式其实也能理解为函数$f(x)$在$g(x)$这个坐标向量上的投影。

那么现在我们使用一些列线性无关且相互正交的无穷维坐标向量作为$g(x)$，比如：

$$
\left{\begin{matrix}
sin(x)\\
sin(2x)\\
...\\
sin(wx)\\
...
\end{matrix}\right.
$$

也就是$sin$函数组成的无穷维空间上的正交基。则函数$A = f(x)$在无穷维正交坐标基上的坐标分量为

$$
\left{\begin{matrix}
A\_1 = A\cdot sin(x) = \int f(x)\cdot sin(x) dx\\
A\_2 = A\cdot sin(2x) = \int f(x)\cdot sin(2x) dx\\
...\\
A\_w = A\cdot sin(wx) = \int f(x)\cdot sin(wx) dx\\
...
\end{matrix}\right.
$$

那么，显然函数$A = f(x)​$就可以表示为在无穷维坐标基上的无穷维坐标：

$$
\begin{aligned}

f(x) &= A\_1\cdot sin(x) + A\_2\cdot sin(2x) + ... + A\_w \cdot sin(wx) + ...\\

&= sin(x)\cdot \int f(x)\cdot sin(x)dx +  sin(2x)\cdot \int f(x)\cdot sin(2x)dx + ... + sin(wx)\cdot \int f(x)\cdot sin(wx)dx + ...

\end{aligned}
$$

## 如何理解傅里叶公式？

<https://www.zhihu.com/question/19714540>

## 参考资料

\===

[Laplace变换与Fourier变换之间有何关系？](https://zhuanlan.zhihu.com/p/130933080)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://luweikxy.gitbook.io/machine-learning-notes/calculus/fourier-transform.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
