# 异常点检测算法（二）

### （一）主成分分析（Principle Component Analysis）

（1）使得数据集合更容易使用；

（2）降低很多算法的计算开销；

（3）去除噪声；

（4）更加容易的描述结果。

Principle Component Analysis 的基本性质：

Principle component analysis provides a set of eigenvectors satisfying the following properties:

（1）If the top-k eigenvectors are picked (by largest eigenvalue), then the k-dimensional hyperplane defined by these eigenvectors, and passing through the mean of the data, is a plane for which the mean square distance of all data points to it is as small as possible among all hyperplanes of dimensionality k.

（2）If the data is transformed to the axis-system corresponding to the orthogonal eigenvectors, the variance of the transformed data along each eigenvector dimension is equal to the corresponding eigenvalue. The covariances of the transformed data in this new representation are 0.

（3）Since the variances of the transformed data along the eigenvectors with small eigenvalues are low, significant deviations of the transformed data from the mean values along these directions may represent outliers.

### （二）基于矩阵分解的异常点检测方法

$X=PDP^{T},$

$Y=dataMat\times P.$

$Y^{j}=dataMat \times P^{j},$

$R^{j}=(P^{j}\times (Y^{j})^{T})^{T}=Y^{j}\times (P^{j})^{T},$

$score(dataMat_{i})=\sum_{j=1}^{p}(|dataMat_{i}-R_{i}^{j}|)\times ev(j)$

$ev(j)=\sum_{k=1}^{j}\lambda_{k}/\sum_{k=1}^{p}\lambda_{k}$

## 3 thoughts on “异常点检测算法（二）”

1. taiping says:

你好! 异常点检测算法 矩阵分解是否有文中的代码例子可以公开获取? 谢谢!

Like

1. 之前个人写过，不知道在github上有没有，可以去搜一下，实在不行也可以自己实现。用Python。

Like

1. taiping says:

好的,多谢!

Like