Machine Learning Notes I - Introduction & Math Review SVD, MLE, Entropy
All modern machine learning algorithms are just nearest neighbors. It’s only that the neural networks are telling you the space in which to compute the distance.
Linear Algebra Woodbury Identity 其中
如果 的逆很好算,那这样变换会大大降低计算量。
Matrix Derivatives 向量 / 标量 所以假设说 ,我们就应该有
标量 / 矩阵 同样的,对于 ,我们有:
酱紫
Jacobian: 向量 / 向量 假设函数是 ,我们想要有
所以其实我们可以看成是 的每行单独拆开来嘛,也就是
Hessian: 二阶导 对于函数 ,我们想要求二阶导
所以其实就是
Derivative Rules 我们先来算 ,考虑到
将 代入上式可以得到
SVD Notes
Compute largest singular values and vectors: .
Approximation:
For all rank matrices :
Calculus of Variations 变分法中,我们考虑的是对于一个函数的函数 , 稍稍改变, 就会稍稍改变:
假设
那么
Maximum Likelihood Estimation Maximum likelihood estimation:
Properties:
Consistency : more data, more accurate (but maybe biased). Statistically efficient : least variance. The value of is invariant to re-parameterization. Entropy 要搞一个 “degree of surprise” 函数 ,满足:
; ; ; . 根据 3 我们有
如果我们令 的话,我们有
所以 是一个线性函数。又因为 ,所以 。 因为 要单调递减且非负。
所以
通常我们取 或 。这边就不管了都写成 了。
于是我们定义
当然因为 entropy 是从物理来的,他也有一定物理意义。就是我们考虑有 个东西, 个状态。第 个状态有 个。那么可能的排列数量为
我们考虑定义 为 时候的状态
其中用到了 Stirling’s approximation
那啥时候 最大捏?
Footnotes