# Linear Discriminant Analysis

Linear Discriminant Analysis （线性判别分析）的缩写也叫LDA，核心就是 $$J(w) = \frac{(\mu\_2 - \mu\_1)^2}{s\_1^2 + s\_2^2}$$ : 就是希望投影后的两类样本 的均值越远越好，但是各类别方差越小越好。

## kernel LDA

$$y = W^T X + \lambda \left | W \right |$$

[线性判别分析（二）——Bayes最优分类器的角度看LDA](https://blog.csdn.net/VictoriaW/article/details/78275394)

从bayes的角度看LDA很重要，因为QDA的train和predict一般实现就是从bayes角度实现的。而且和 NaiveBayes中的关联Gaussian Naive Bayes classifier 也是从这个角度的。

[高斯判别分析模型](https://www.cnblogs.com/fanyabo/p/4067295.html)

[MLAPP 读书笔记 - 04 高斯模型(Gaussian models)](https://github.com/Kivy-CN/MLAPP-CN/blob/master/04%20Gaussian%20models.md)

![](/files/-M7DePJoN5kahYXoVUxo)\
LDA假设各类别的协方差一样，而QDA没有该要求，所以更灵活。

一般看y=1的概率，但是也可以看log-probability ratios 。\
（此不作为重点，因为一般分类用AUC来评价）

![](/files/-M7DePJpUNakU3lOEDeO)从此式也可以看出是关于x的一次函数，所以是线性判别![](/files/-M7DePJqxNHUC9Do0_GQ)

### 参考佳文

[Linear Discriminant Analysis 线性判别分析](https://blog.csdn.net/matrix_space/article/details/51375691)

<https://mp.weixin.qq.com/s/AeLwfmM0N-b1dfxt3v4C-A>

[线性判别分析LDA详解](https://blog.csdn.net/qianhen123/article/details/39832951)\
[机器学习中的数学(4)-线性判别分析（LDA）, 主成分分析(PCA)](http://www.cnblogs.com/LeftNotEasy/archive/2011/01/08/lda-and-pca-machine-learning.html)

[正则化最小二乘线性判别分析算法](http://www.doc88.com/p-9793175171823.html)

<https://blog.csdn.net/VictoriaW/article/details/78275394>

<http://www.doc88.com/p-147667786401.html>


---

# 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://json007.gitbook.io/svm/math-linear_algebra/linear_discriminant_analysis.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.
