apacheCNml&dl
2669
Sklearn/sklearn-cookbook-zh/1.md
Normal file
1570
Sklearn/sklearn-cookbook-zh/2.md
Normal file
1014
Sklearn/sklearn-cookbook-zh/3.md
Normal file
1249
Sklearn/sklearn-cookbook-zh/4.md
Normal file
1163
Sklearn/sklearn-cookbook-zh/5.md
Normal file
6
Sklearn/sklearn-cookbook-zh/SUMMARY.md
Normal file
@@ -0,0 +1,6 @@
|
||||
+ [Scikit-learn 秘籍](README.md)
|
||||
+ [第一章 模型预处理](1.md)
|
||||
+ [第二章 处理线性模型](2.md)
|
||||
+ [第三章 使用距离向量构建模型](3.md)
|
||||
+ [第四章 使用 scikit-learn 对数据分类](4.md)
|
||||
+ [第五章 模型后处理](5.md)
|
||||
BIN
Sklearn/sklearn-cookbook-zh/img/1-10-1.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/1-11-1.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/1-11-2.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/1-11-3.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/1-12-1.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/1-13-1.png
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/1-13-2.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/1-15-1.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/1-15-2.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/1-15-3.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/1-17-1.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/1-2-1.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/1-9-1.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-1-1.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-1-2.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-2-1.png
Normal file
|
After Width: | Height: | Size: 8.7 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-2-2.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-2-3.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-3-1.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-3-2.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-4-1.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-6-1.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-7-1.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-8-1.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-8-2.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-9-1.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/2-9-2.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-1-1.jpg
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-1-2.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-2-1.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-2-2.jpg
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-3-1.jpg
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-3-2.jpg
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-5-1.jpg
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-5-2.jpg
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-6-1.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-6-2.jpg
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-6-3.jpg
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-7-1.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-7-2.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-7-3.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-7-4.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-8-1.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-8-2.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-8-3.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/3-9-1.jpg
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-1-1.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-1-2.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-1-3.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-2-1.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-2-2.jpg
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-2-3.jpg
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-3-1.jpg
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-3-2.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-4-1.jpg
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-4-2.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-5-1.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-5-2.jpg
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-5-3.jpg
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-7-1.jpg
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-7-2.jpg
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/4-7-3.jpg
Normal file
|
After Width: | Height: | Size: 60 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/5-3-1.jpg
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/5-3-2.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/5-3-3.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/5-4-1.jpg
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/5-5-1.jpg
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/5-8-1.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/5-8-2.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
Sklearn/sklearn-cookbook-zh/img/5-9-1.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
73
Sklearn/sklearn-doc-zh/SUMMARY.md
Normal file
@@ -0,0 +1,73 @@
|
||||
* [安装 scikit-learn](docs/master/62.md)
|
||||
* 用户指南
|
||||
* [1. 监督学习](docs/master/1.md)
|
||||
* [1.1. 广义线性模型](docs/master/2.md)
|
||||
* [1.2. 线性和二次判别分析](docs/master/3.md)
|
||||
* [1.3. 内核岭回归](docs/master/4.md)
|
||||
* [1.4. 支持向量机](docs/master/5.md)
|
||||
* [1.5. 随机梯度下降](docs/master/6.md)
|
||||
* [1.6. 最近邻](docs/master/7.md)
|
||||
* [1.7. 高斯过程](docs/master/8.md)
|
||||
* [1.8. 交叉分解](docs/master/9.md)
|
||||
* [1.9. 朴素贝叶斯](docs/master/10.md)
|
||||
* [1.10. 决策树](docs/master/11.md)
|
||||
* [1.11. 集成方法](docs/master/12.md)
|
||||
* [1.12. 多类和多标签算法](docs/master/13.md)
|
||||
* [1.13. 特征选择](docs/master/14.md)
|
||||
* [1.14. 半监督学习](docs/master/15.md)
|
||||
* [1.15. 等式回归](docs/master/16.md)
|
||||
* [1.16. 概率校准](docs/master/17.md)
|
||||
* [1.17. 神经网络模型(有监督)](docs/master/18.md)
|
||||
* [2. 无监督学习](docs/master/19.md)
|
||||
* [2.1. 高斯混合模型](docs/master/20.md)
|
||||
* [2.2. 流形学习](docs/master/21.md)
|
||||
* [2.3. 聚类](docs/master/22.md)
|
||||
* [2.4. 双聚类](docs/master/23.md)
|
||||
* [2.5. 分解成分中的信号(矩阵分解问题)](docs/master/24.md)
|
||||
* [2.6. 协方差估计](docs/master/25.md)
|
||||
* [2.7. 新奇和异常值检测](docs/master/26.md)
|
||||
* [2.8. 密度估计](docs/master/27.md)
|
||||
* [2.9. 神经网络模型(无监督)](docs/master/28.md)
|
||||
* [3. 模型选择和评估](docs/master/29.md)
|
||||
* [3.1. 交叉验证:评估估算器的表现](docs/master/30.md)
|
||||
* [3.2. 调整估计器的超参数](docs/master/31.md)
|
||||
* [3.3. 模型评估: 量化预测的质量](docs/master/32.md)
|
||||
* [3.4. 模型持久化](docs/master/33.md)
|
||||
* [3.5. 验证曲线: 绘制分数以评估模型](docs/master/34.md)
|
||||
* [4. 检验](docs/master/35.md)
|
||||
* [4.1. 部分依赖图](docs/master/36.md)
|
||||
* [5. 数据集转换](docs/master/37.md)
|
||||
* [5.1. Pipeline(管道)和 FeatureUnion(特征联合): 合并的评估器](docs/master/38.md)
|
||||
* [5.2. 特征提取](docs/master/39.md)
|
||||
* [5.3 预处理数据](docs/master/40.md)
|
||||
* [5.4 缺失值插补](docs/master/41.md)
|
||||
* [5.5. 无监督降维](docs/master/42.md)
|
||||
* [5.6. 随机投影](docs/master/43.md)
|
||||
* [5.7. 内核近似](docs/master/44.md)
|
||||
* [5.8. 成对的矩阵, 类别和核函数](docs/master/45.md)
|
||||
* [5.9. 预测目标 (`y`) 的转换](docs/master/46.md)
|
||||
* [6. 数据集加载工具](docs/master/47.md)
|
||||
* [6.1. 通用数据集 API](docs/master/47.md)
|
||||
* [6.2. 玩具数据集](docs/master/47.md)
|
||||
* [6.3 真实世界中的数据集](docs/master/47.md)
|
||||
* [6.4. 样本生成器](docs/master/47.md)
|
||||
* [6.5. 加载其他数据集](docs/master/47.md)
|
||||
* [7. 使用scikit-learn计算](docs/master/48.md)
|
||||
* [7.1. 大规模计算的策略: 更大量的数据](docs/master/48.md)
|
||||
* [7.2. 计算性能](docs/master/48.md)
|
||||
* [7.3. 并行性、资源管理和配置](docs/master/48.md)
|
||||
* [教程](docs/master/50.md)
|
||||
* [使用 scikit-learn 介绍机器学习](docs/master/51.md)
|
||||
* [关于科学数据处理的统计学习教程](docs/master/52.md)
|
||||
* [机器学习: scikit-learn 中的设置以及预估对象](docs/master/53.md)
|
||||
* [监督学习:从高维观察预测输出变量](docs/master/54.md)
|
||||
* [模型选择:选择估计量及其参数](docs/master/55.md)
|
||||
* [无监督学习: 寻求数据表示](docs/master/56.md)
|
||||
* [把它们放在一起](docs/master/57.md)
|
||||
* [寻求帮助](docs/master/58.md)
|
||||
* [处理文本数据](docs/master/59.md)
|
||||
* [选择正确的评估器(estimator.md)](docs/master/60.md)
|
||||
* [外部资源,视频和谈话](docs/master/61.md)
|
||||
* [API 参考](https://scikit-learn.org/stable/modules/classes.html)
|
||||
* [常见问题](docs/master/63.md)
|
||||
* [时光轴](docs/master/64.md)
|
||||
@@ -0,0 +1,78 @@
|
||||
|
||||
# 频谱双聚类算法演示
|
||||
|
||||
> 翻译者:[@N!no](https://github.com/lovelybuggies)
|
||||
> 校验者:待校验
|
||||
|
||||
这个例子演示了如何使用光谱聚类算法生成棋盘数据集并对其进行聚类处理。
|
||||
|
||||
数据是用`make_checkerboard`函数生成的,然后打乱顺序并传递给光谱双聚类算法。变换后的矩阵的行和列被重新排列,以显示该算法找到的双聚类。
|
||||
|
||||
行和列标签向量的外积表示棋盘结构。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
```
|
||||
consensus score: 1.0
|
||||
```
|
||||
|
||||
|
||||
```python
|
||||
print(__doc__)
|
||||
|
||||
# Author: Kemal Eren <kemal@kemaleren.com>
|
||||
# License: BSD 3 clause
|
||||
|
||||
import numpy as np
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
from sklearn.datasets import make_checkerboard
|
||||
from sklearn.cluster import SpectralBiclustering
|
||||
from sklearn.metrics import consensus_score
|
||||
|
||||
|
||||
n_clusters = (4, 3)
|
||||
data, rows, columns = make_checkerboard(
|
||||
shape=(300, 300), n_clusters=n_clusters, noise=10,
|
||||
shuffle=False, random_state=0)
|
||||
|
||||
plt.matshow(data, cmap=plt.cm.Blues)
|
||||
plt.title("Original dataset")
|
||||
|
||||
# 打乱聚类顺序
|
||||
rng = np.random.RandomState(0)
|
||||
row_idx = rng.permutation(data.shape[0])
|
||||
col_idx = rng.permutation(data.shape[1])
|
||||
data = data[row_idx][:, col_idx]
|
||||
|
||||
plt.matshow(data, cmap=plt.cm.Blues)
|
||||
plt.title("Shuffled dataset")
|
||||
|
||||
model = SpectralBiclustering(n_clusters=n_clusters, method='log',
|
||||
random_state=0)
|
||||
model.fit(data)
|
||||
score = consensus_score(model.biclusters_,
|
||||
(rows[:, row_idx], columns[:, col_idx]))
|
||||
|
||||
print("consensus score: {:.1f}".format(score))
|
||||
|
||||
fit_data = data[np.argsort(model.row_labels_)]
|
||||
fit_data = fit_data[:, np.argsort(model.column_labels_)]
|
||||
|
||||
plt.matshow(fit_data, cmap=plt.cm.Blues)
|
||||
plt.title("After biclustering; rearranged to show biclusters")
|
||||
|
||||
plt.matshow(np.outer(np.sort(model.row_labels_) + 1,
|
||||
np.sort(model.column_labels_) + 1),
|
||||
cmap=plt.cm.Blues)
|
||||
plt.title("Checkerboard structure of rearranged data")
|
||||
|
||||
plt.show()
|
||||
```
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
|
||||
# 频谱共聚算法演示
|
||||
|
||||
> 翻译者:[@N!no](https://github.com/lovelybuggies)
|
||||
> 校验者:待校验
|
||||
|
||||
这个例子演示了如何使用谱协聚类算法生成数据集并对其进行双聚类处理。
|
||||
|
||||
数据集是使用 `make_biclusters` 函数生成的,该函数创建一个小值矩阵,并将大值植入双聚类。然后将行和列打乱并传递给光谱协聚算法。通过重新排列变换后的矩阵可以使双聚类连续,这展示出该算法找到双聚类的准确性。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
```
|
||||
consensus score: 1.0
|
||||
```
|
||||
|
||||
|
||||
```python
|
||||
print(__doc__)
|
||||
|
||||
# Author: Kemal Eren <kemal@kemaleren.com>
|
||||
# License: BSD 3 clause
|
||||
|
||||
import numpy as np
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
from sklearn.datasets import make_biclusters
|
||||
from sklearn.cluster import SpectralCoclustering
|
||||
from sklearn.metrics import consensus_score
|
||||
|
||||
data, rows, columns = make_biclusters(
|
||||
shape=(300, 300), n_clusters=5, noise=5,
|
||||
shuffle=False, random_state=0)
|
||||
|
||||
plt.matshow(data, cmap=plt.cm.Blues)
|
||||
plt.title("Original dataset")
|
||||
|
||||
# 打乱聚类的位置
|
||||
rng = np.random.RandomState(0)
|
||||
row_idx = rng.permutation(data.shape[0])
|
||||
col_idx = rng.permutation(data.shape[1])
|
||||
data = data[row_idx][:, col_idx]
|
||||
|
||||
plt.matshow(data, cmap=plt.cm.Blues)
|
||||
plt.title("Shuffled dataset")
|
||||
|
||||
model = SpectralCoclustering(n_clusters=5, random_state=0)
|
||||
model.fit(data)
|
||||
score = consensus_score(model.biclusters_,
|
||||
(rows[:, row_idx], columns[:, col_idx]))
|
||||
|
||||
print("consensus score: {:.3f}".format(score))
|
||||
|
||||
fit_data = data[np.argsort(model.row_labels_)]
|
||||
fit_data = fit_data[:, np.argsort(model.column_labels_)]
|
||||
|
||||
plt.matshow(fit_data, cmap=plt.cm.Blues)
|
||||
plt.title("After biclustering; rearranged to show biclusters")
|
||||
|
||||
plt.show()
|
||||
```
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
|
||||
# 使用频谱共聚算法对文档进行聚合
|
||||
|
||||
> 翻译者:[@N!no](https://github.com/lovelybuggies)
|
||||
> 校验者:待校验
|
||||
|
||||
这个例子演示了20个新闻组数据集上的光谱协聚类算法。‘comp.os.ms-windows.misc’ 类别被排除在外,因为它包含许多只包含数据的帖子。
|
||||
|
||||
TF-IDF 矢量帖构成一个词频矩阵,然后使用 Dhillon 光谱协聚算法对其进行重组。由此产生的文档词双聚类表明在这些子集文档中被使用频率更高的子集词。
|
||||
|
||||
对于一些最好的双聚类来说,它最常见的文档类别和十个最重要的单词会被打印出来。最佳双类别由其归一化的切割决定。最好的单词是通过比较它们在两区内和两区外的总和来确定的。
|
||||
|
||||
为了进行比较,我们还使用 MiniBatchKMeans 对文档进行集群。从双聚类衍生出的文档聚类比使用 MiniBatchKMeans 得到的聚类具有更好的 V-measure。
|
||||
|
||||
```
|
||||
Vectorizing...
|
||||
Coclustering...
|
||||
Done in 2.75s. V-measure: 0.4387
|
||||
MiniBatchKMeans...
|
||||
Done in 5.69s. V-measure: 0.3344
|
||||
|
||||
Best biclusters:
|
||||
----------------
|
||||
bicluster 0 : 1829 documents, 2524 words
|
||||
categories : 22% comp.sys.ibm.pc.hardware, 19% comp.sys.mac.hardware, 18% comp.graphics
|
||||
words : card, pc, ram, drive, bus, mac, motherboard, port, windows, floppy
|
||||
|
||||
bicluster 1 : 2391 documents, 3275 words
|
||||
categories : 18% rec.motorcycles, 17% rec.autos, 15% sci.electronics
|
||||
words : bike, engine, car, dod, bmw, honda, oil, motorcycle, behanna, ysu
|
||||
|
||||
bicluster 2 : 1887 documents, 4232 words
|
||||
categories : 23% talk.politics.guns, 19% talk.politics.misc, 13% sci.med
|
||||
words : gun, guns, firearms, geb, drugs, banks, dyer, amendment, clinton, cdt
|
||||
|
||||
bicluster 3 : 1146 documents, 3263 words
|
||||
categories : 29% talk.politics.mideast, 26% soc.religion.christian, 25% alt.atheism
|
||||
words : god, jesus, christians, atheists, kent, sin, morality, belief, resurrection, marriage
|
||||
|
||||
bicluster 4 : 1732 documents, 3967 words
|
||||
categories : 26% sci.crypt, 23% sci.space, 17% sci.med
|
||||
words : clipper, encryption, key, escrow, nsa, crypto, keys, intercon, secure, wiretap
|
||||
```
|
||||
|
||||
|
||||
```python
|
||||
from collections import defaultdict
|
||||
import operator
|
||||
from time import time
|
||||
|
||||
import numpy as np
|
||||
|
||||
from sklearn.cluster import SpectralCoclustering
|
||||
from sklearn.cluster import MiniBatchKMeans
|
||||
from sklearn.datasets import fetch_20newsgroups
|
||||
from sklearn.feature_extraction.text import TfidfVectorizer
|
||||
from sklearn.metrics.cluster import v_measure_score
|
||||
|
||||
print(__doc__)
|
||||
|
||||
|
||||
def number_normalizer(tokens):
|
||||
""" 将所有数字标记映射到占位符。
|
||||
|
||||
对于许多应用程序来说,以数字开头的令牌并没有直接的用处,但是这样的令牌存在的事实可能是相关的。通过应用这种降维形式,一些方法可能会表现得更好。
|
||||
"""
|
||||
return ("#NUMBER" if token[0].isdigit() else token for token in tokens)
|
||||
|
||||
|
||||
class NumberNormalizingVectorizer(TfidfVectorizer):
|
||||
def build_tokenizer(self):
|
||||
tokenize = super().build_tokenizer()
|
||||
return lambda doc: list(number_normalizer(tokenize(doc)))
|
||||
|
||||
|
||||
# 不包含 'comp.os.ms-windows.misc' 类别
|
||||
categories = ['alt.atheism', 'comp.graphics',
|
||||
'comp.sys.ibm.pc.hardware', 'comp.sys.mac.hardware',
|
||||
'comp.windows.x', 'misc.forsale', 'rec.autos',
|
||||
'rec.motorcycles', 'rec.sport.baseball',
|
||||
'rec.sport.hockey', 'sci.crypt', 'sci.electronics',
|
||||
'sci.med', 'sci.space', 'soc.religion.christian',
|
||||
'talk.politics.guns', 'talk.politics.mideast',
|
||||
'talk.politics.misc', 'talk.religion.misc']
|
||||
newsgroups = fetch_20newsgroups(categories=categories)
|
||||
y_true = newsgroups.target
|
||||
|
||||
vectorizer = NumberNormalizingVectorizer(stop_words='english', min_df=5)
|
||||
cocluster = SpectralCoclustering(n_clusters=len(categories),
|
||||
svd_method='arpack', random_state=0)
|
||||
kmeans = MiniBatchKMeans(n_clusters=len(categories), batch_size=20000,
|
||||
random_state=0)
|
||||
|
||||
print("Vectorizing...")
|
||||
X = vectorizer.fit_transform(newsgroups.data)
|
||||
|
||||
print("Coclustering...")
|
||||
start_time = time()
|
||||
cocluster.fit(X)
|
||||
y_cocluster = cocluster.row_labels_
|
||||
print("Done in {:.2f}s. V-measure: {:.4f}".format(
|
||||
time() - start_time,
|
||||
v_measure_score(y_cocluster, y_true)))
|
||||
|
||||
print("MiniBatchKMeans...")
|
||||
start_time = time()
|
||||
y_kmeans = kmeans.fit_predict(X)
|
||||
print("Done in {:.2f}s. V-measure: {:.4f}".format(
|
||||
time() - start_time,
|
||||
v_measure_score(y_kmeans, y_true)))
|
||||
|
||||
feature_names = vectorizer.get_feature_names()
|
||||
document_names = list(newsgroups.target_names[i] for i in newsgroups.target)
|
||||
|
||||
|
||||
def bicluster_ncut(i):
|
||||
rows, cols = cocluster.get_indices(i)
|
||||
if not (np.any(rows) and np.any(cols)):
|
||||
import sys
|
||||
return sys.float_info.max
|
||||
row_complement = np.nonzero(np.logical_not(cocluster.rows_[i]))[0]
|
||||
col_complement = np.nonzero(np.logical_not(cocluster.columns_[i]))[0]
|
||||
# 注意:接下来的操作等同于 X[rows[:, np.newaxis], cols].sum()
|
||||
# 但是会针对于 scipy <= 0.16 的版本更快一些
|
||||
weight = X[rows][:, cols].sum()
|
||||
cut = (X[row_complement][:, cols].sum() +
|
||||
X[rows][:, col_complement].sum())
|
||||
return cut / weight
|
||||
|
||||
|
||||
def most_common(d):
|
||||
"""默认字典有最大值的项。
|
||||
|
||||
在 Python >= 2.7 中类似于 Counter.most_common 。
|
||||
"""
|
||||
return sorted(d.items(), key=operator.itemgetter(1), reverse=True)
|
||||
|
||||
|
||||
bicluster_ncuts = list(bicluster_ncut(i)
|
||||
for i in range(len(newsgroups.target_names)))
|
||||
best_idx = np.argsort(bicluster_ncuts)[:5]
|
||||
|
||||
print()
|
||||
print("Best biclusters:")
|
||||
print("----------------")
|
||||
for idx, cluster in enumerate(best_idx):
|
||||
n_rows, n_cols = cocluster.get_shape(cluster)
|
||||
cluster_docs, cluster_words = cocluster.get_indices(cluster)
|
||||
if not len(cluster_docs) or not len(cluster_words):
|
||||
continue
|
||||
|
||||
# 种类
|
||||
counter = defaultdict(int)
|
||||
for i in cluster_docs:
|
||||
counter[document_names[i]] += 1
|
||||
cat_string = ", ".join("{:.0f}% {}".format(float(c) / n_rows * 100, name)
|
||||
for name, c in most_common(counter)[:3])
|
||||
|
||||
# 单词
|
||||
out_of_cluster_docs = cocluster.row_labels_ != cluster
|
||||
out_of_cluster_docs = np.where(out_of_cluster_docs)[0]
|
||||
word_col = X[:, cluster_words]
|
||||
word_scores = np.array(word_col[cluster_docs, :].sum(axis=0) -
|
||||
word_col[out_of_cluster_docs, :].sum(axis=0))
|
||||
word_scores = word_scores.ravel()
|
||||
important_words = list(feature_names[cluster_words[i]]
|
||||
for i in word_scores.argsort()[:-11:-1])
|
||||
|
||||
print("bicluster {} : {} documents, {} words".format(
|
||||
idx, n_rows, n_cols))
|
||||
print("categories : {}".format(cat_string))
|
||||
print("words : {}\n".format(', '.join(important_words)))
|
||||
```
|
||||
|
||||
316
Sklearn/sklearn-doc-zh/examples/README.md
Normal file
@@ -0,0 +1,316 @@
|
||||
# 示例
|
||||
|
||||
英文地址: <https://scikit-learn.org/stable/auto_examples/index.html>
|
||||
|
||||
## 其他示例
|
||||
|
||||
scikit-learn 的 Miscellaneous 和入门示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [紧凑的估计表示](https://scikit-learn.org/stable/auto_examples/plot_changed_only_pprint_parameter.html#sphx-glr-auto-examples-plot-changed-only-pprint-parameter-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id2) |  <br/> [带有可视化API的ROC曲线](https://scikit-learn.org/stable/auto_examples/plot_roc_curve_visualization_api.html#sphx-glr-auto-examples-plot-roc-curve-visualization-api-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id3) |  <br/> [序回归](https://scikit-learn.org/stable/auto_examples/plot_isotonic_regression.html#sphx-glr-auto-examples-plot-isotonic-regression-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id4) |  <br/> [先进的绘图具有部分依赖](https://scikit-learn.org/stable/auto_examples/plot_partial_dependence_visualization_api.html#sphx-glr-auto-examples-plot-partial-dependence-visualization-api-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id5) |
|
||||
|  <br/> [使用多输出估计器完成人脸](https://scikit-learn.org/stable/auto_examples/plot_multioutput_face_completion.html#sphx-glr-auto-examples-plot-multioutput-face-completion-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id6) |  <br/> [多标签分类](https://scikit-learn.org/stable/auto_examples/plot_multilabel.html#sphx-glr-auto-examples-plot-multilabel-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id7) |  <br/> [比较异常检测算法以对玩具数据集进行异常检测](https://scikit-learn.org/stable/auto_examples/plot_anomaly_comparison.html#sphx-glr-auto-examples-plot-anomaly-comparison-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id8) |  <br/> [具有随机投影嵌入的Johnson-Lindenstrauss边界](https://scikit-learn.org/stable/auto_examples/plot_johnson_lindenstrauss_bound.html#sphx-glr-auto-examples-plot-johnson-lindenstrauss-bound-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id9) |
|
||||
|  <br/> [内核岭回归和SVR的比较](https://scikit-learn.org/stable/auto_examples/plot_kernel_ridge_regression.html#sphx-glr-auto-examples-plot-kernel-ridge-regression-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id10) |  <br/> [RBF内核的显式特征图逼近](https://scikit-learn.org/stable/auto_examples/plot_kernel_approximation.html#sphx-glr-auto-examples-plot-kernel-approximation-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id11) |
|
||||
|
||||
|
||||
## 双聚类
|
||||
|
||||
有关`sklearn.cluster.bicluster`模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [频谱共聚算法演示](Biclustering/a_demo_of_the_spectral_co-clustering_algorithm.md) |  <br/> [频谱双聚类算法的演示](Biclustering/a_demo_of_the_spectral_clustering_algorithm.md) |  <br/> [使用频谱共聚算法对文档进行聚合](Biclustering/biclustering_documents_with_the_spectral_co-clustering_algorithm.md) ||
|
||||
|
||||
|
||||
## 校准
|
||||
|
||||
举例说明了对分类器的预测概率进行校准的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [分类器校准的比较](https://scikit-learn.org/stable/auto_examples/calibration/plot_compare_calibration.html#sphx-glr-auto-examples-calibration-plot-compare-calibration-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id15) |  <br/> [概率校准曲线](https://scikit-learn.org/stable/auto_examples/calibration/plot_calibration_curve.html#sphx-glr-auto-examples-calibration-plot-calibration-curve-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id16) |  <br/> [分类器的概率校准](https://scikit-learn.org/stable/auto_examples/calibration/plot_calibration.html#sphx-glr-auto-examples-calibration-plot-calibration-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id17) |  <br/> [3级分类的概率校准](https://scikit-learn.org/stable/auto_examples/calibration/plot_calibration_multiclass.html#sphx-glr-auto-examples-calibration-plot-calibration-multiclass-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id18) |
|
||||
|
||||
|
||||
## 分类
|
||||
|
||||
有关分类算法的一般示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [分类法线和收缩线线性判别分析](https://scikit-learn.org/stable/auto_examples/classification/plot_lda.html#sphx-glr-auto-examples-classification-plot-lda-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id19) |  <br/> [识别手写数字](https://scikit-learn.org/stable/auto_examples/classification/plot_digits_classification.html#sphx-glr-auto-examples-classification-plot-digits-classification-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id20) |  <br/> [情节分类概率](https://scikit-learn.org/stable/auto_examples/classification/plot_classification_probability.html#sphx-glr-auto-examples-classification-plot-classification-probability-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id21) |  <br/> [分类器比较](https://scikit-learn.org/stable/auto_examples/classification/plot_classifier_comparison.html#sphx-glr-auto-examples-classification-plot-classifier-comparison-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id22) |
|
||||
|  <br/> [线性和二次判别分析与协方差椭球](https://scikit-learn.org/stable/auto_examples/classification/plot_lda_qda.html#sphx-glr-auto-examples-classification-plot-lda-qda-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id23) |
|
||||
|
||||
|
||||
## 多聚类
|
||||
|
||||
有关[`sklearn.cluster`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.cluster "sklearn.cluster")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [绘制层次聚类树状图](https://scikit-learn.org/stable/auto_examples/cluster/plot_agglomerative_dendrogram.html#sphx-glr-auto-examples-cluster-plot-agglomerative-dendrogram-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id24) |  <br/> [功能集聚](https://scikit-learn.org/stable/auto_examples/cluster/plot_digits_agglomeration.html#sphx-glr-auto-examples-cluster-plot-digits-agglomeration-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id25) |  <br/> [均值漂移聚类算法的演示](https://scikit-learn.org/stable/auto_examples/cluster/plot_mean_shift.html#sphx-glr-auto-examples-cluster-plot-mean-shift-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id26) |  <br/> [的k均值假设示范](https://scikit-learn.org/stable/auto_examples/cluster/plot_kmeans_assumptions.html#sphx-glr-auto-examples-cluster-plot-kmeans-assumptions-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id27) |
|
||||
|  <br/> [在线学习面部表情字典](https://scikit-learn.org/stable/auto_examples/cluster/plot_dict_face_patches.html#sphx-glr-auto-examples-cluster-plot-dict-face-patches-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id28) |  <br/> [矢量量化示例](https://scikit-learn.org/stable/auto_examples/cluster/plot_face_compress.html#sphx-glr-auto-examples-cluster-plot-face-compress-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id29) |  <br/> [相似性传播聚类算法演示](https://scikit-learn.org/stable/auto_examples/cluster/plot_affinity_propagation.html#sphx-glr-auto-examples-cluster-plot-affinity-propagation-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id30) |  <br/> [有和没有结构的聚集聚类](https://scikit-learn.org/stable/auto_examples/cluster/plot_agglomerative_clustering.html#sphx-glr-auto-examples-cluster-plot-agglomerative-clustering-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id31) |
|
||||
|  <br/> [分割区域中希腊硬币的图片](https://scikit-learn.org/stable/auto_examples/cluster/plot_coin_segmentation.html#sphx-glr-auto-examples-cluster-plot-coin-segmentation-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id32) |  <br/> [二维数字嵌入中的各种聚集聚类](https://scikit-learn.org/stable/auto_examples/cluster/plot_digits_linkage.html#sphx-glr-auto-examples-cluster-plot-digits-linkage-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id33) |  <br/> [K-means聚类](https://scikit-learn.org/stable/auto_examples/cluster/plot_cluster_iris.html#sphx-glr-auto-examples-cluster-plot-cluster-iris-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id34) |  <br/> [光谱聚类用于图像分割](https://scikit-learn.org/stable/auto_examples/cluster/plot_segmentation_toy.html#sphx-glr-auto-examples-cluster-plot-segmentation-toy-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id35) |
|
||||
|  <br/> [硬币图像上的结构化Ward层次聚类演示](https://scikit-learn.org/stable/auto_examples/cluster/plot_coin_ward_segmentation.html#sphx-glr-auto-examples-cluster-plot-coin-ward-segmentation-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id36) |  <br/> [DBSCAN聚类算法演示](https://scikit-learn.org/stable/auto_examples/cluster/plot_dbscan.html#sphx-glr-auto-examples-cluster-plot-dbscan-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id37) |  <br/> [使用K均值的颜色量化](https://scikit-learn.org/stable/auto_examples/cluster/plot_color_quantization.html#sphx-glr-auto-examples-cluster-plot-color-quantization-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id38) |  <br/> [分层聚类:结构化与非结构化病房](https://scikit-learn.org/stable/auto_examples/cluster/plot_ward_structured_vs_unstructured.html#sphx-glr-auto-examples-cluster-plot-ward-structured-vs-unstructured-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id39) |
|
||||
|  <br/> [具有不同指标的聚集集群](https://scikit-learn.org/stable/auto_examples/cluster/plot_agglomerative_clustering_metrics.html#sphx-glr-auto-examples-cluster-plot-agglomerative-clustering-metrics-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id40) |  <br/> [归纳聚类](https://scikit-learn.org/stable/auto_examples/cluster/plot_inductive_clustering.html#sphx-glr-auto-examples-cluster-plot-inductive-clustering-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id41) |  <br/> [OPTICS聚类算法演示](https://scikit-learn.org/stable/auto_examples/cluster/plot_optics.html#sphx-glr-auto-examples-cluster-plot-optics-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id42) |  <br/> [比较桦木和MiniBatchKMeans](https://scikit-learn.org/stable/auto_examples/cluster/plot_birch_vs_minibatchkmeans.html#sphx-glr-auto-examples-cluster-plot-birch-vs-minibatchkmeans-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id43) |
|
||||
|  <br/> [k均值初始化影响的实证评估](https://scikit-learn.org/stable/auto_examples/cluster/plot_kmeans_stability_low_dim_dense.html#sphx-glr-auto-examples-cluster-plot-kmeans-stability-low-dim-dense-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id44) |  <br/> [集群绩效评估中机会的调整](https://scikit-learn.org/stable/auto_examples/cluster/plot_adjusted_for_chance_measures.html#sphx-glr-auto-examples-cluster-plot-adjusted-for-chance-measures-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id45) |  <br/> [K-Means和MiniBatchKMeans聚类算法的比较](https://scikit-learn.org/stable/auto_examples/cluster/plot_mini_batch_kmeans.html#sphx-glr-auto-examples-cluster-plot-mini-batch-kmeans-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id46) |  <br/> [特征集聚与单变量选择](https://scikit-learn.org/stable/auto_examples/cluster/plot_feature_agglomeration_vs_univariate_selection.html#sphx-glr-auto-examples-cluster-plot-feature-agglomeration-vs-univariate-selection-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id47) |
|
||||
|  <br/> [手写数字数据上的K-Means聚类演示](https://scikit-learn.org/stable/auto_examples/cluster/plot_kmeans_digits.html#sphx-glr-auto-examples-cluster-plot-kmeans-digits-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id48) |  <br/> [比较玩具数据集上的不同层次链接方法](https://scikit-learn.org/stable/auto_examples/cluster/plot_linkage_comparison.html#sphx-glr-auto-examples-cluster-plot-linkage-comparison-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id49) |  <br/> [在KMeans聚类上通过轮廓分析选择聚类数量](https://scikit-learn.org/stable/auto_examples/cluster/plot_kmeans_silhouette_analysis.html#sphx-glr-auto-examples-cluster-plot-kmeans-silhouette-analysis-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id50) |  <br/> [比较玩具数据集上的不同聚类算法](https://scikit-learn.org/stable/auto_examples/cluster/plot_cluster_comparison.html#sphx-glr-auto-examples-cluster-plot-cluster-comparison-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id51) |
|
||||
|
||||
|
||||
## 协方差估计
|
||||
|
||||
有关[`sklearn.covariance`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.covariance)模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [Ledoit-Wolf与OAS估计](https://scikit-learn.org/stable/auto_examples/covariance/plot_lw_vs_oas.html#sphx-glr-auto-examples-covariance-plot-lw-vs-oas-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id52) |  <br/> [稀疏逆协方差估计](https://scikit-learn.org/stable/auto_examples/covariance/plot_sparse_cov.html#sphx-glr-auto-examples-covariance-plot-sparse-cov-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id53) |  <br/> [收缩协方差估计:LedoitWolf与OAS和最大似然性](https://scikit-learn.org/stable/auto_examples/covariance/plot_covariance_estimation.html#sphx-glr-auto-examples-covariance-plot-covariance-estimation-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id54) |  <br/> [健壮的协方差估计和马氏距离相关性](https://scikit-learn.org/stable/auto_examples/covariance/plot_mahalanobis_distances.html#sphx-glr-auto-examples-covariance-plot-mahalanobis-distances-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id55) |
|
||||
|  <br/> [乐百氏VS实证协方差估计](https://scikit-learn.org/stable/auto_examples/covariance/plot_robust_vs_empirical_covariance.html#sphx-glr-auto-examples-covariance-plot-robust-vs-empirical-covariance-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id56) |
|
||||
|
||||
|
||||
## 交叉分解
|
||||
|
||||
有关[`sklearn.cross_decomposition`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.cross_decomposition "sklearn.cross_decomposition")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [比较交叉分解方法](https://scikit-learn.org/stable/auto_examples/cross_decomposition/plot_compare_cross_decomposition.html#sphx-glr-auto-examples-cross-decomposition-plot-compare-cross-decomposition-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id57) |
|
||||
|
||||
|
||||
## 数据集示例
|
||||
|
||||
有关[`sklearn.datasets`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.datasets "sklearn.datasets")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [Digit数据集](https://scikit-learn.org/stable/auto_examples/datasets/plot_digits_last_image.html#sphx-glr-auto-examples-datasets-plot-digits-last-image-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id58) |  <br/> [虹膜数据集](https://scikit-learn.org/stable/auto_examples/datasets/plot_iris_dataset.html#sphx-glr-auto-examples-datasets-plot-iris-dataset-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id59) |  <br/> [绘制随机生成的分类数据集](https://scikit-learn.org/stable/auto_examples/datasets/plot_random_dataset.html#sphx-glr-auto-examples-datasets-plot-random-dataset-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id60) |  <br/> [绘制随机生成的多标签数据集](https://scikit-learn.org/stable/auto_examples/datasets/plot_random_multilabel_dataset.html#sphx-glr-auto-examples-datasets-plot-random-multilabel-dataset-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id61) |
|
||||
|
||||
|
||||
## 决策树
|
||||
|
||||
有关[`sklearn.tree`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.tree "sklearn.tree")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [决策树回归](https://scikit-learn.org/stable/auto_examples/tree/plot_tree_regression.html#sphx-glr-auto-examples-tree-plot-tree-regression-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id62) |  <br/> [多路输出决策树回归](https://scikit-learn.org/stable/auto_examples/tree/plot_tree_regression_multioutput.html#sphx-glr-auto-examples-tree-plot-tree-regression-multioutput-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id63) |  <br/> [在虹膜数据集上绘制决策树的决策面](https://scikit-learn.org/stable/auto_examples/tree/plot_iris_dtc.html#sphx-glr-auto-examples-tree-plot-iris-dtc-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id64) |  <br/> [使用成本复杂度修剪来修剪修剪决策树](https://scikit-learn.org/stable/auto_examples/tree/plot_cost_complexity_pruning.html#sphx-glr-auto-examples-tree-plot-cost-complexity-pruning-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id65) |
|
||||
|  <br/> [了解决策树结构](https://scikit-learn.org/stable/auto_examples/tree/plot_unveil_tree_structure.html#sphx-glr-auto-examples-tree-plot-unveil-tree-structure-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id66) |
|
||||
|
||||
|
||||
## 分解
|
||||
|
||||
有关[`sklearn.decomposition`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.decomposition "sklearn。分解")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [β-发散损失函数](https://scikit-learn.org/stable/auto_examples/decomposition/plot_beta_divergence.html#sphx-glr-auto-examples-decomposition-plot-beta-divergence-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id67) |  <br/> [具有虹膜数据集的PCA示例](https://scikit-learn.org/stable/auto_examples/decomposition/plot_pca_iris.html#sphx-glr-auto-examples-decomposition-plot-pca-iris-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id68) |  <br/> [增量](https://scikit-learn.org/stable/auto_examples/decomposition/plot_incremental_pca.html#sphx-glr-auto-examples-decomposition-plot-incremental-pca-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id69) |  <br/> [Iris数据集的LDA和PCA二维投影的比较](https://scikit-learn.org/stable/auto_examples/decomposition/plot_pca_vs_lda.html#sphx-glr-auto-examples-decomposition-plot-pca-vs-lda-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id70) |
|
||||
|  <br/> [使用FastICA进行盲源分离](https://scikit-learn.org/stable/auto_examples/decomposition/plot_ica_blind_source_separation.html#sphx-glr-auto-examples-decomposition-plot-ica-blind-source-separation-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id71) |  <br/> [主成分分析(PCA)](https://scikit-learn.org/stable/auto_examples/decomposition/plot_pca_3d.html#sphx-glr-auto-examples-decomposition-plot-pca-3d-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id72) |  <br/> [2D点云上的](https://scikit-learn.org/stable/auto_examples/decomposition/plot_ica_vs_pca.html#sphx-glr-auto-examples-decomposition-plot-ica-vs-pca-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id73) |  <br/> [内核](https://scikit-learn.org/stable/auto_examples/decomposition/plot_kernel_pca.html#sphx-glr-auto-examples-decomposition-plot-kernel-pca-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id74) |
|
||||
|  <br/> [概率PCA和因子分析(FA)进行模型选择](https://scikit-learn.org/stable/auto_examples/decomposition/plot_pca_vs_fa_model_selection.html#sphx-glr-auto-examples-decomposition-plot-pca-vs-fa-model-selection-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id75) |  <br/> [使用预先计算的字典进行稀疏编码](https://scikit-learn.org/stable/auto_examples/decomposition/plot_sparse_coding.html#sphx-glr-auto-examples-decomposition-plot-sparse-coding-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id76) |  <br/> [图片使用字典学习去噪](https://scikit-learn.org/stable/auto_examples/decomposition/plot_image_denoising.html#sphx-glr-auto-examples-decomposition-plot-image-denoising-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id77) |  <br/> [Faces数据集分解](https://scikit-learn.org/stable/auto_examples/decomposition/plot_faces_decomposition.html#sphx-glr-auto-examples-decomposition-plot-faces-decomposition-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id78) |
|
||||
|
||||
|
||||
## 集成方法
|
||||
|
||||
有关[`sklearn.ensemble`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.ensemble "sklearn.ensemble")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [并行树木森林的像素重要性](https://scikit-learn.org/stable/auto_examples/ensemble/plot_forest_importances_faces.html#sphx-glr-auto-examples-ensemble-plot-forest-importances-faces-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id79) |  <br/> [使用AdaBoost进行决策树回归](https://scikit-learn.org/stable/auto_examples/ensemble/plot_adaboost_regression.html#sphx-glr-auto-examples-ensemble-plot-adaboost-regression-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id80) |  <br/> [绘制个人和投票回归预测](https://scikit-learn.org/stable/auto_examples/ensemble/plot_voting_regressor.html#sphx-glr-auto-examples-ensemble-plot-voting-regressor-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id81) |  <br/> [树木森林的功能重要性](https://scikit-learn.org/stable/auto_examples/ensemble/plot_forest_importances.html#sphx-glr-auto-examples-ensemble-plot-forest-importances-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id82) |
|
||||
|  <br/> [IsolationForest示例](https://scikit-learn.org/stable/auto_examples/ensemble/plot_isolation_forest.html#sphx-glr-auto-examples-ensemble-plot-isolation-forest-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id83) |  <br/> [绘制VotingClassifier的决策边界](https://scikit-learn.org/stable/auto_examples/ensemble/plot_voting_decision_regions.html#sphx-glr-auto-examples-ensemble-plot-voting-decision-regions-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id84) |  <br/> [比较随机森林和多输出元估计器](https://scikit-learn.org/stable/auto_examples/ensemble/plot_random_forest_regression_multioutput.html#sphx-glr-auto-examples-ensemble-plot-random-forest-regression-multioutput-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id85) |  <br/> [梯度提升回归的预测间隔](https://scikit-learn.org/stable/auto_examples/ensemble/plot_gradient_boosting_quantile.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-quantile-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id86) |
|
||||
|  <br/> [梯度提升正则化](https://scikit-learn.org/stable/auto_examples/ensemble/plot_gradient_boosting_regularization.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-regularization-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id87) |  <br/> [绘制由VotingClassifier计算的类概率](https://scikit-learn.org/stable/auto_examples/ensemble/plot_voting_probas.html#sphx-glr-auto-examples-ensemble-plot-voting-probas-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id88) |  <br/> [梯度推进回归](https://scikit-learn.org/stable/auto_examples/ensemble/plot_gradient_boosting_regression.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-regression-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id89) |  <br/> [随机森林的OOB错误](https://scikit-learn.org/stable/auto_examples/ensemble/plot_ensemble_oob.html#sphx-glr-auto-examples-ensemble-plot-ensemble-oob-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id90) |
|
||||
|  <br/> [两个级的AdaBoost](https://scikit-learn.org/stable/auto_examples/ensemble/plot_adaboost_twoclass.html#sphx-glr-auto-examples-ensemble-plot-adaboost-twoclass-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id91) |  <br/> [使用完全随机树的哈希特征转换](https://scikit-learn.org/stable/auto_examples/ensemble/plot_random_forest_embedding.html#sphx-glr-auto-examples-ensemble-plot-random-forest-embedding-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id92) |  <br/> [多类AdaBoosted决策树](https://scikit-learn.org/stable/auto_examples/ensemble/plot_adaboost_multiclass.html#sphx-glr-auto-examples-ensemble-plot-adaboost-multiclass-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id93) |  <br/> [离散相对真正的AdaBoost](https://scikit-learn.org/stable/auto_examples/ensemble/plot_adaboost_hastie_10_2.html#sphx-glr-auto-examples-ensemble-plot-adaboost-hastie-10-2-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id94) |
|
||||
|  <br/> [使用堆叠组合预测](https://scikit-learn.org/stable/auto_examples/ensemble/plot_stack_predictors.html#sphx-glr-auto-examples-ensemble-plot-stack-predictors-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id95) |  <br/> [提前终止的梯度推进](https://scikit-learn.org/stable/auto_examples/ensemble/plot_gradient_boosting_early_stopping.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-early-stopping-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id96) |  <br/> [带有树群的特征变换](https://scikit-learn.org/stable/auto_examples/ensemble/plot_feature_transformation.html#sphx-glr-auto-examples-ensemble-plot-feature-transformation-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id97) |  <br/> [梯度提升袋外估计](https://scikit-learn.org/stable/auto_examples/ensemble/plot_gradient_boosting_oob.html#sphx-glr-auto-examples-ensemble-plot-gradient-boosting-oob-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id98) |
|
||||
|  <br/> [单一估计器与装袋:偏差方差分解](https://scikit-learn.org/stable/auto_examples/ensemble/plot_bias_variance.html#sphx-glr-auto-examples-ensemble-plot-bias-variance-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id99) |  <br/> [在虹膜数据集上绘制树木合奏的决策面](https://scikit-learn.org/stable/auto_examples/ensemble/plot_forest_iris.html#sphx-glr-auto-examples-ensemble-plot-forest-iris-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id100) |
|
||||
|
||||
|
||||
## 基于真实数据集的示例
|
||||
|
||||
具有一些中等大小的数据集或交互式用户界面的现实问题的应用程序。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [真实数据集的异常值检测](https://scikit-learn.org/stable/auto_examples/applications/plot_outlier_detection_housing.html#sphx-glr-auto-examples-applications-plot-outlier-detection-housing-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id101) |  <br/> [压缩感测:使用L1先验(Lasso)进行层析成像重建](https://scikit-learn.org/stable/auto_examples/applications/plot_tomography_l1_reconstruction.html#sphx-glr-auto-examples-applications-plot-tomography-l1-reconstruction-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id102) |  <br/> [非负矩阵分解和隐含狄利克雷分布话题提取](https://scikit-learn.org/stable/auto_examples/applications/plot_topics_extraction_with_nmf_lda.html#sphx-glr-auto-examples-applications-plot-topics-extraction-with-nmf-lda-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id103) |  <br/> [使用特征脸和支持向量机的](https://scikit-learn.org/stable/auto_examples/applications/plot_face_recognition.html#sphx-glr-auto-examples-applications-plot-face-recognition-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id104 "Permalink to this image")[识别示例](https://scikit-learn.org/stable/auto_examples/applications/plot_face_recognition.html#sphx-glr-auto-examples-applications-plot-face-recognition-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id104) |
|
||||
|  <br/> [模型复杂度影响](https://scikit-learn.org/stable/auto_examples/applications/plot_model_complexity_influence.html#sphx-glr-auto-examples-applications-plot-model-complexity-influence-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id105) |  <br/> [可视化的股市结构](https://scikit-learn.org/stable/auto_examples/applications/plot_stock_market.html#sphx-glr-auto-examples-applications-plot-stock-market-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id106) |  <br/> [维基百科的主要特征向量](https://scikit-learn.org/stable/auto_examples/applications/wikipedia_principal_eigenvector.html#sphx-glr-auto-examples-applications-wikipedia-principal-eigenvector-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id107) |  <br/> [物种分布建模](https://scikit-learn.org/stable/auto_examples/applications/plot_species_distribution_modeling.html#sphx-glr-auto-examples-applications-plot-species-distribution-modeling-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id108) |
|
||||
|  <br/> [Libsvm](https://scikit-learn.org/stable/auto_examples/applications/svm_gui.html#sphx-glr-auto-examples-applications-svm-gui-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id109) |  <br/> [预测延迟](https://scikit-learn.org/stable/auto_examples/applications/plot_prediction_latency.html#sphx-glr-auto-examples-applications-plot-prediction-latency-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id110) |  <br/> [文本文档的核心分类](https://scikit-learn.org/stable/auto_examples/applications/plot_out_of_core_classification.html#sphx-glr-auto-examples-applications-plot-out-of-core-classification-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id111) |
|
||||
|
||||
|
||||
## 特征选择
|
||||
|
||||
有关[`sklearn.feature_selection`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.feature_selection "sklearn.feature_selection")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [递归特征消除](https://scikit-learn.org/stable/auto_examples/feature_selection/plot_rfe_digits.html#sphx-glr-auto-examples-feature-selection-plot-rfe-digits-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id112) |  <br/> [F检验和相互信息的比较](https://scikit-learn.org/stable/auto_examples/feature_selection/plot_f_test_vs_mi.html#sphx-glr-auto-examples-feature-selection-plot-f-test-vs-mi-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id113) |  <br/> [管道Anova](https://scikit-learn.org/stable/auto_examples/feature_selection/plot_feature_selection_pipeline.html#sphx-glr-auto-examples-feature-selection-plot-feature-selection-pipeline-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id114) |  <br/> [通过交叉验证消除递归特征](https://scikit-learn.org/stable/auto_examples/feature_selection/plot_rfe_with_cross_validation.html#sphx-glr-auto-examples-feature-selection-plot-rfe-with-cross-validation-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id115) |
|
||||
|  <br/> [使用SelectFromModel和LassoCV特征选择](https://scikit-learn.org/stable/auto_examples/feature_selection/plot_select_from_model_boston.html#sphx-glr-auto-examples-feature-selection-plot-select-from-model-boston-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id116) |  <br/> [与排列测试的分类评分的意义](https://scikit-learn.org/stable/auto_examples/feature_selection/plot_permutation_test_for_classification.html#sphx-glr-auto-examples-feature-selection-plot-permutation-test-for-classification-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id117) |  <br/> [单变量特征选择](https://scikit-learn.org/stable/auto_examples/feature_selection/plot_feature_selection.html#sphx-glr-auto-examples-feature-selection-plot-feature-selection-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id118) |
|
||||
|
||||
|
||||
## 高斯混合模型
|
||||
|
||||
有关[`sklearn.mixture`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.mixture "sklearn.mixture")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [高斯混合的密度估计](https://scikit-learn.org/stable/auto_examples/mixture/plot_gmm_pdf.html#sphx-glr-auto-examples-mixture-plot-gmm-pdf-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id119) |  <br/> [高斯混合模型椭球](https://scikit-learn.org/stable/auto_examples/mixture/plot_gmm.html#sphx-glr-auto-examples-mixture-plot-gmm-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id120) |  <br/> [高斯混合模型选择](https://scikit-learn.org/stable/auto_examples/mixture/plot_gmm_selection.html#sphx-glr-auto-examples-mixture-plot-gmm-selection-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id121) |  <br/> [GMM协方差](https://scikit-learn.org/stable/auto_examples/mixture/plot_gmm_covariances.html#sphx-glr-auto-examples-mixture-plot-gmm-covariances-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id122) |
|
||||
|  <br/> [高斯混合模型正弦曲线](https://scikit-learn.org/stable/auto_examples/mixture/plot_gmm_sin.html#sphx-glr-auto-examples-mixture-plot-gmm-sin-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id123) |  <br/> [贝叶斯高斯混合变量的浓度先验类型分析](https://scikit-learn.org/stable/auto_examples/mixture/plot_concentration_prior.html#sphx-glr-auto-examples-mixture-plot-concentration-prior-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id124) |
|
||||
|
||||
|
||||
## 高斯机器学习过程
|
||||
|
||||
有关[`sklearn.gaussian_process`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.gaussian_process "sklearn.gaussian_process")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [XOR数据集上的高斯过程分类(GPC)的图示](https://scikit-learn.org/stable/auto_examples/gaussian_process/plot_gpc_xor.html#sphx-glr-auto-examples-gaussian-process-plot-gpc-xor-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id125) |  <br/> [虹膜数据集上的高斯过程分类(GPC)](https://scikit-learn.org/stable/auto_examples/gaussian_process/plot_gpc_iris.html#sphx-glr-auto-examples-gaussian-process-plot-gpc-iris-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id126) |  <br/> [核岭和高斯过程回归的比较](https://scikit-learn.org/stable/auto_examples/gaussian_process/plot_compare_gpr_krr.html#sphx-glr-auto-examples-gaussian-process-plot-compare-gpr-krr-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id127) |  <br/> [不同内核的先验和后验高斯过程的图示](https://scikit-learn.org/stable/auto_examples/gaussian_process/plot_gpr_prior_posterior.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-prior-posterior-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id128) |
|
||||
|  <br/> [高斯过程分类(GPC)的等概率线](https://scikit-learn.org/stable/auto_examples/gaussian_process/plot_gpc_isoprobability.html#sphx-glr-auto-examples-gaussian-process-plot-gpc-isoprobability-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id129) |  <br/> [概率预测的结果与高斯过程分类(GPC)](https://scikit-learn.org/stable/auto_examples/gaussian_process/plot_gpc.html#sphx-glr-auto-examples-gaussian-process-plot-gpc-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id130) |  <br/> [具有噪声水平估计的高斯过程回归(GPR)](https://scikit-learn.org/stable/auto_examples/gaussian_process/plot_gpr_noisy.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-noisy-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id131) |  <br/> [高斯过程回归:基本入门示例](https://scikit-learn.org/stable/auto_examples/gaussian_process/plot_gpr_noisy_targets.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-noisy-targets-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id132) |
|
||||
|  <br/> [基于Mauna Loa CO2数据的高斯过程回归(GPR)。](https://scikit-learn.org/stable/auto_examples/gaussian_process/plot_gpr_co2.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-co2-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id133) |  <br/> [离散数据结构上的高斯过程](https://scikit-learn.org/stable/auto_examples/gaussian_process/plot_gpr_on_structured_data.html#sphx-glr-auto-examples-gaussian-process-plot-gpr-on-structured-data-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id134) |
|
||||
|
||||
|
||||
## 广义线性模型
|
||||
|
||||
有关[`sklearn.linear_model`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.linear_model "sklearn.linear_model")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [使用LARS的套索路径](https://scikit-learn.org/stable/auto_examples/linear_model/plot_lasso_lars.html#sphx-glr-auto-examples-linear-model-plot-lasso-lars-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id135) |  <br/> [绘制岭系数作为正则化的函数](https://scikit-learn.org/stable/auto_examples/linear_model/plot_ridge_path.html#sphx-glr-auto-examples-linear-model-plot-ridge-path-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id136) |  <br/> [SGD:最大余量分隔超平面](https://scikit-learn.org/stable/auto_examples/linear_model/plot_sgd_separating_hyperplane.html#sphx-glr-auto-examples-linear-model-plot-sgd-separating-hyperplane-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id137) |  <br/> [SGD:凸损失函数](https://scikit-learn.org/stable/auto_examples/linear_model/plot_sgd_loss_functions.html#sphx-glr-auto-examples-linear-model-plot-sgd-loss-functions-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id138) |
|
||||
|  <br/> [普通最小二乘法和岭回归方差](https://scikit-learn.org/stable/auto_examples/linear_model/plot_ols_ridge_variance.html#sphx-glr-auto-examples-linear-model-plot-ols-ridge-variance-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id139) |  <br/> [绘制Ridge系数作为L2正则化的函数](https://scikit-learn.org/stable/auto_examples/linear_model/plot_ridge_coeffs.html#sphx-glr-auto-examples-linear-model-plot-ridge-coeffs-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id140) |  <br/> [SGD:罚款](https://scikit-learn.org/stable/auto_examples/linear_model/plot_sgd_penalties.html#sphx-glr-auto-examples-linear-model-plot-sgd-penalties-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id141) |  <br/> [多项式插值](https://scikit-learn.org/stable/auto_examples/linear_model/plot_polynomial_interpolation.html#sphx-glr-auto-examples-linear-model-plot-polynomial-interpolation-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id142) |
|
||||
|  <br/> [物流功能](https://scikit-learn.org/stable/auto_examples/linear_model/plot_logistic.html#sphx-glr-auto-examples-linear-model-plot-logistic-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id143) |  <br/> [L1-Logistic回归的正规化道路](https://scikit-learn.org/stable/auto_examples/linear_model/plot_logistic_path.html#sphx-glr-auto-examples-linear-model-plot-logistic-path-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id144) |  <br/> [Logistic回归3类分类器](https://scikit-learn.org/stable/auto_examples/linear_model/plot_iris_logistic.html#sphx-glr-auto-examples-linear-model-plot-iris-logistic-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id145) |  <br/> [SGD:加权样本](https://scikit-learn.org/stable/auto_examples/linear_model/plot_sgd_weighted_samples.html#sphx-glr-auto-examples-linear-model-plot-sgd-weighted-samples-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id146) |
|
||||
|  <br/> [线性回归示例](https://scikit-learn.org/stable/auto_examples/linear_model/plot_ols.html#sphx-glr-auto-examples-linear-model-plot-ols-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id147) |  <br/> [使用RANSAC进行稳健的线性模型估计](https://scikit-learn.org/stable/auto_examples/linear_model/plot_ransac.html#sphx-glr-auto-examples-linear-model-plot-ransac-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id148) |  <br/> [稀疏实施例:装修仅设有1和2](https://scikit-learn.org/stable/auto_examples/linear_model/plot_ols_3d.html#sphx-glr-auto-examples-linear-model-plot-ols-3d-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id149) |  <br/> [HuberRegressor VS岭集具有较强的异常](https://scikit-learn.org/stable/auto_examples/linear_model/plot_huber_vs_ridge.html#sphx-glr-auto-examples-linear-model-plot-huber-vs-ridge-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id150) |
|
||||
|  <br/> [套索上密集和稀疏数据](https://scikit-learn.org/stable/auto_examples/linear_model/plot_lasso_dense_vs_sparse_data.html#sphx-glr-auto-examples-linear-model-plot-lasso-dense-vs-sparse-data-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id151) |  <br/> [比较各种在线求解器](https://scikit-learn.org/stable/auto_examples/linear_model/plot_sgd_comparison.html#sphx-glr-auto-examples-linear-model-plot-sgd-comparison-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id152) |  <br/> [多任务套索的联合特征选择](https://scikit-learn.org/stable/auto_examples/linear_model/plot_multi_task_lasso_support.html#sphx-glr-auto-examples-linear-model-plot-multi-task-lasso-support-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id153) |  <br/> [使用多项式逻辑+ L1的MNIST分类](https://scikit-learn.org/stable/auto_examples/linear_model/plot_sparse_logistic_regression_mnist.html#sphx-glr-auto-examples-linear-model-plot-sparse-logistic-regression-mnist-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id154) |  <br/> [在虹膜数据集上绘制多类](https://scikit-learn.org/stable/auto_examples/linear_model/plot_sgd_iris.html#sphx-glr-auto-examples-linear-model-plot-sgd-iris-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id155) |
|
||||
|  <br/> [正交匹配追踪](https://scikit-learn.org/stable/auto_examples/linear_model/plot_omp.html#sphx-glr-auto-examples-linear-model-plot-omp-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id156) |  <br/> [套索和弹性网用于稀疏信号](https://scikit-learn.org/stable/auto_examples/linear_model/plot_lasso_and_elasticnet.html#sphx-glr-auto-examples-linear-model-plot-lasso-and-elasticnet-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id157) |  <br/> [贝叶斯岭回归的曲线拟合](https://scikit-learn.org/stable/auto_examples/linear_model/plot_bayesian_ridge_curvefit.html#sphx-glr-auto-examples-linear-model-plot-bayesian-ridge-curvefit-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id158) |  <br/> [Theil-Sen回归](https://scikit-learn.org/stable/auto_examples/linear_model/plot_theilsen.html#sphx-glr-auto-examples-linear-model-plot-theilsen-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id159) |
|
||||
|  <br/> [绘制多项式和一对一静态Logistic回归](https://scikit-learn.org/stable/auto_examples/linear_model/plot_logistic_multinomial.html#sphx-glr-auto-examples-linear-model-plot-logistic-multinomial-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id160) |  <br/> [稳健的线性估计器拟合](https://scikit-learn.org/stable/auto_examples/linear_model/plot_robust_fit.html#sphx-glr-auto-examples-linear-model-plot-robust-fit-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id161) |  <br/> [Logistic回归中的L1惩罚和稀疏性](https://scikit-learn.org/stable/auto_examples/linear_model/plot_logistic_l1_l2_sparsity.html#sphx-glr-auto-examples-linear-model-plot-logistic-l1-l2-sparsity-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id162) |  <br/> [套索和弹性网络](https://scikit-learn.org/stable/auto_examples/linear_model/plot_lasso_coordinate_descent_path.html#sphx-glr-auto-examples-linear-model-plot-lasso-coordinate-descent-path-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id163) |
|
||||
|  <br/> [自动相关性确定回归(ARD)](https://scikit-learn.org/stable/auto_examples/linear_model/plot_ard.html#sphx-glr-auto-examples-linear-model-plot-ard-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id164) |  <br/> [贝叶斯岭回归](https://scikit-learn.org/stable/auto_examples/linear_model/plot_bayesian_ridge.html#sphx-glr-auto-examples-linear-model-plot-bayesian-ridge-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id165) |  <br/> [20newgroups上的多类稀疏逻辑回归](https://scikit-learn.org/stable/auto_examples/linear_model/plot_sparse_logistic_regression_20newsgroups.html#sphx-glr-auto-examples-linear-model-plot-sparse-logistic-regression-20newsgroups-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id166) |  <br/> [套索模型选择:交叉验证/ AIC /](https://scikit-learn.org/stable/auto_examples/linear_model/plot_lasso_model_selection.html#sphx-glr-auto-examples-linear-model-plot-lasso-model-selection-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id167) |
|
||||
|  <br/> [早期停止随机梯度下降的](https://scikit-learn.org/stable/auto_examples/linear_model/plot_sgd_early_stopping.html#sphx-glr-auto-examples-linear-model-plot-sgd-early-stopping-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id168) |
|
||||
|
||||
|
||||
## 检查
|
||||
|
||||
与[`sklearn.inspection`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.inspection "斯克莱恩检查")模块有关的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [具有多重共线性或相关特征的置换重要性](https://scikit-learn.org/stable/auto_examples/inspection/plot_permutation_importance_multicollinear.html#sphx-glr-auto-examples-inspection-plot-permutation-importance-multicollinear-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id169) |  <br/> [排列重要性与随机森林特征重要性(MDI)](https://scikit-learn.org/stable/auto_examples/inspection/plot_permutation_importance.html#sphx-glr-auto-examples-inspection-plot-permutation-importance-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id170) |  <br/> [部分依赖图](https://scikit-learn.org/stable/auto_examples/inspection/plot_partial_dependence.html#sphx-glr-auto-examples-inspection-plot-partial-dependence-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id171) |
|
||||
|
||||
|
||||
## 流形学习
|
||||
|
||||
有关[`sklearn.manifold`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.manifold "sklearn。流形")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [使用LLE减少瑞士卷](https://scikit-learn.org/stable/auto_examples/manifold/plot_swissroll.html#sphx-glr-auto-examples-manifold-plot-swissroll-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id172) |  <br/> [流形学习方法的比较](https://scikit-learn.org/stable/auto_examples/manifold/plot_compare_methods.html#sphx-glr-auto-examples-manifold-plot-compare-methods-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id173) |  <br/> [多维缩放](https://scikit-learn.org/stable/auto_examples/manifold/plot_mds.html#sphx-glr-auto-examples-manifold-plot-mds-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id174) |  <br/> [叔SNE:各种困惑值对形状的影响](https://scikit-learn.org/stable/auto_examples/manifold/plot_t_sne_perplexity.html#sphx-glr-auto-examples-manifold-plot-t-sne-perplexity-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id175) |
|
||||
|  <br/> [截断球面上的流形学习方法](https://scikit-learn.org/stable/auto_examples/manifold/plot_manifold_sphere.html#sphx-glr-auto-examples-manifold-plot-manifold-sphere-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id176) |  <br/> [手写数字流形学习:局部线性嵌入,Isomap…](https://scikit-learn.org/stable/auto_examples/manifold/plot_lle_digits.html#sphx-glr-auto-examples-manifold-plot-lle-digits-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id177) |
|
||||
|
||||
|
||||
## 缺失值插补
|
||||
|
||||
有关[`sklearn.impute`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.impute "sklearn.impute")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [使用IterativeImputer的变体估算缺失值](https://scikit-learn.org/stable/auto_examples/impute/plot_iterative_imputer_variants_comparison.html#sphx-glr-auto-examples-impute-plot-iterative-imputer-variants-comparison-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id178) |  <br/> [在构建估算器之前估算缺失值](https://scikit-learn.org/stable/auto_examples/impute/plot_missing_values.html#sphx-glr-auto-examples-impute-plot-missing-values-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id179) |
|
||||
|
||||
|
||||
## 选型
|
||||
|
||||
与[`sklearn.model_selection`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.model_selection "sklearn.model_selection")模块有关的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [绘制交叉验证的预测](https://scikit-learn.org/stable/auto_examples/model_selection/plot_cv_predict.html#sphx-glr-auto-examples-model-selection-plot-cv-predict-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id180) |  <br/> [混淆矩阵](https://scikit-learn.org/stable/auto_examples/model_selection/plot_confusion_matrix.html#sphx-glr-auto-examples-model-selection-plot-confusion-matrix-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id181) |  <br/> [绘图验证曲线](https://scikit-learn.org/stable/auto_examples/model_selection/plot_validation_curve.html#sphx-glr-auto-examples-model-selection-plot-validation-curve-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id182) |  <br/> [拟合不足与拟合过度](https://scikit-learn.org/stable/auto_examples/model_selection/plot_underfitting_overfitting.html#sphx-glr-auto-examples-model-selection-plot-underfitting-overfitting-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id183) |
|
||||
|  <br/> [使用带有交叉验证的网格搜索进行参数估计](https://scikit-learn.org/stable/auto_examples/model_selection/plot_grid_search_digits.html#sphx-glr-auto-examples-model-selection-plot-grid-search-digits-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id184) |  <br/> [对于比较估计超参数随机搜索和网格搜索](https://scikit-learn.org/stable/auto_examples/model_selection/plot_randomized_search.html#sphx-glr-auto-examples-model-selection-plot-randomized-search-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id185) |  <br/> [训练错误与测试错误](https://scikit-learn.org/stable/auto_examples/model_selection/plot_train_error_vs_test_error.html#sphx-glr-auto-examples-model-selection-plot-train-error-vs-test-error-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id186) |  <br/> [具有交叉验证的接收器操作特性(ROC)](https://scikit-learn.org/stable/auto_examples/model_selection/plot_roc_crossval.html#sphx-glr-auto-examples-model-selection-plot-roc-crossval-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id187) |
|
||||
|  <br/> [嵌套与非嵌套交叉验证](https://scikit-learn.org/stable/auto_examples/model_selection/plot_nested_cross_validation_iris.html#sphx-glr-auto-examples-model-selection-plot-nested-cross-validation-iris-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id188) |  <br/> [在cross_val_score和GridSearchCV上进行多指标评估的演示](https://scikit-learn.org/stable/auto_examples/model_selection/plot_multi_metric_evaluation.html#sphx-glr-auto-examples-model-selection-plot-multi-metric-evaluation-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id189) |  <br/> [用于文本特征提取和评估的示例管道](https://scikit-learn.org/stable/auto_examples/model_selection/grid_search_text_feature_extraction.html#sphx-glr-auto-examples-model-selection-grid-search-text-feature-extraction-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id190) |  <br/> [平衡模型的复杂性和交叉验证的分数](https://scikit-learn.org/stable/auto_examples/model_selection/plot_grid_search_refit_callable.html#sphx-glr-auto-examples-model-selection-plot-grid-search-refit-callable-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id191) |
|
||||
|  <br/> [在scikit-learn中可视化交叉验证行为](https://scikit-learn.org/stable/auto_examples/model_selection/plot_cv_indices.html#sphx-glr-auto-examples-model-selection-plot-cv-indices-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id192) |  <br/> [接收器工作特性(ROC)](https://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.html#sphx-glr-auto-examples-model-selection-plot-roc-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id193) |  <br/> [精密召回](https://scikit-learn.org/stable/auto_examples/model_selection/plot_precision_recall.html#sphx-glr-auto-examples-model-selection-plot-precision-recall-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id194) |  <br/> [绘制学习曲线](https://scikit-learn.org/stable/auto_examples/model_selection/plot_learning_curve.html#sphx-glr-auto-examples-model-selection-plot-learning-curve-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id195) |
|
||||
|
||||
|
||||
## 多输出方法
|
||||
|
||||
有关[`sklearn.multioutput`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.multioutput "sklearn.multioutput")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [分类器链](https://scikit-learn.org/stable/auto_examples/multioutput/plot_classifier_chain_yeast.html#sphx-glr-auto-examples-multioutput-plot-classifier-chain-yeast-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id196) |
|
||||
|
||||
|
||||
## 最近邻
|
||||
|
||||
有关[`sklearn.neighbors`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.neighbors "sklearn.neighbors")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [最近邻居回归](https://scikit-learn.org/stable/auto_examples/neighbors/plot_regression.html#sphx-glr-auto-examples-neighbors-plot-regression-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id197) |  <br/> [使用局部离群因子(LOF)进行离群检测](https://scikit-learn.org/stable/auto_examples/neighbors/plot_lof_outlier_detection.html#sphx-glr-auto-examples-neighbors-plot-lof-outlier-detection-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id198) |  <br/> [最近邻居分类](https://scikit-learn.org/stable/auto_examples/neighbors/plot_classification.html#sphx-glr-auto-examples-neighbors-plot-classification-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id199) |  <br/> [最近质心分类](https://scikit-learn.org/stable/auto_examples/neighbors/plot_nearest_centroid.html#sphx-glr-auto-examples-neighbors-plot-nearest-centroid-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id200) |
|
||||
|  <br/> [核密度估计](https://scikit-learn.org/stable/auto_examples/neighbors/plot_digits_kde_sampling.html#sphx-glr-auto-examples-neighbors-plot-digits-kde-sampling-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id201) |  <br/> [缓存最近的邻居](https://scikit-learn.org/stable/auto_examples/neighbors/plot_caching_nearest_neighbors.html#sphx-glr-auto-examples-neighbors-plot-caching-nearest-neighbors-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id202) |  <br/> [邻域成分分析图](https://scikit-learn.org/stable/auto_examples/neighbors/plot_nca_illustration.html#sphx-glr-auto-examples-neighbors-plot-nca-illustration-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id203) |  <br/> [具有局部异常值(LOF)的新颖性检测](https://scikit-learn.org/stable/auto_examples/neighbors/plot_lof_novelty_detection.html#sphx-glr-auto-examples-neighbors-plot-lof-novelty-detection-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id204) |
|
||||
|  <br/> [比较具有和不具有邻域分量分析的最近邻域](https://scikit-learn.org/stable/auto_examples/neighbors/plot_nca_classification.html#sphx-glr-auto-examples-neighbors-plot-nca-classification-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id205) |  <br/> [使用邻域分量分析进行](https://scikit-learn.org/stable/auto_examples/neighbors/plot_nca_dim_reduction.html#sphx-glr-auto-examples-neighbors-plot-nca-dim-reduction-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id206)[维](https://scikit-learn.org/stable/auto_examples/neighbors/plot_nca_dim_reduction.html#sphx-glr-auto-examples-neighbors-plot-nca-dim-reduction-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id206) |  <br/> [物种分布的核密度估计](https://scikit-learn.org/stable/auto_examples/neighbors/plot_species_kde.html#sphx-glr-auto-examples-neighbors-plot-species-kde-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id207) |  <br/> [简单的1D内核密度估计](https://scikit-learn.org/stable/auto_examples/neighbors/plot_kde_1d.html#sphx-glr-auto-examples-neighbors-plot-kde-1d-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id208) |
|
||||
|  <br/> [TSNE中的近似最近邻居](https://scikit-learn.org/stable/auto_examples/neighbors/approximate_nearest_neighbors.html#sphx-glr-auto-examples-neighbors-approximate-nearest-neighbors-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id209) |
|
||||
|
||||
|
||||
## 神经网络
|
||||
|
||||
有关[`sklearn.neural_network`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.neural_network "sklearn.neural_network")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [在MNIST上可视化MLP权重](https://scikit-learn.org/stable/auto_examples/neural_networks/plot_mnist_filters.html#sphx-glr-auto-examples-neural-networks-plot-mnist-filters-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id210) |  <br/> [用于数字分类的受限玻尔兹曼机功能](https://scikit-learn.org/stable/auto_examples/neural_networks/plot_rbm_logistic_classification.html#sphx-glr-auto-examples-neural-networks-plot-rbm-logistic-classification-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id211) |  <br/> [在多层感知变化正规化](https://scikit-learn.org/stable/auto_examples/neural_networks/plot_mlp_alpha.html#sphx-glr-auto-examples-neural-networks-plot-mlp-alpha-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id212) |  <br/> [比较随机学习策略MLPClassifier](https://scikit-learn.org/stable/auto_examples/neural_networks/plot_mlp_training_curves.html#sphx-glr-auto-examples-neural-networks-plot-mlp-training-curves-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id213) |
|
||||
|
||||
|
||||
## 管道和复合估计器
|
||||
|
||||
由其他估算器组成变压器和管道的示例。请参阅《[用户指南》](https://scikit-learn.org/stable/modules/compose.html#combining-estimators)。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [连结多个特征提取方法](https://scikit-learn.org/stable/auto_examples/compose/plot_feature_union.html#sphx-glr-auto-examples-compose-plot-feature-union-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id214) |  <br/> [流水线:链接PCA和逻辑回归](https://scikit-learn.org/stable/auto_examples/compose/plot_digits_pipe.html#sphx-glr-auto-examples-compose-plot-digits-pipe-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id215) |  <br/> [混合类型的列转换器](https://scikit-learn.org/stable/auto_examples/compose/plot_column_transformer_mixed_types.html#sphx-glr-auto-examples-compose-plot-column-transformer-mixed-types-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id216) |  <br/> [使用Pipeline和GridSearchCV选择降维](https://scikit-learn.org/stable/auto_examples/compose/plot_compare_reduction.html#sphx-glr-auto-examples-compose-plot-compare-reduction-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id217) |
|
||||
|  <br/> [具有异构数据源的列转换器](https://scikit-learn.org/stable/auto_examples/compose/plot_column_transformer.html#sphx-glr-auto-examples-compose-plot-column-transformer-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id218) |  <br/> [在回归模型中转换目标的效果](https://scikit-learn.org/stable/auto_examples/compose/plot_transformed_target.html#sphx-glr-auto-examples-compose-plot-transformed-target-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id219) |
|
||||
|
||||
|
||||
## 预处理
|
||||
|
||||
有关[`sklearn.preprocessing`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.preprocessing "sklearn。预处理")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [使用FunctionTransformer选择列](https://scikit-learn.org/stable/auto_examples/preprocessing/plot_function_transformer.html#sphx-glr-auto-examples-preprocessing-plot-function-transformer-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id220) |  <br/> [使用KBinsDiscretizer离散化连续特征](https://scikit-learn.org/stable/auto_examples/preprocessing/plot_discretization.html#sphx-glr-auto-examples-preprocessing-plot-discretization-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id221) |  <br/> [演示KBinsDiscretizer的不同策略](https://scikit-learn.org/stable/auto_examples/preprocessing/plot_discretization_strategies.html#sphx-glr-auto-examples-preprocessing-plot-discretization-strategies-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id222) |  <br/> [特征缩放的重要性](https://scikit-learn.org/stable/auto_examples/preprocessing/plot_scaling_importance.html#sphx-glr-auto-examples-preprocessing-plot-scaling-importance-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id223) |
|
||||
|  <br/> [地图数据正态分布](https://scikit-learn.org/stable/auto_examples/preprocessing/plot_map_data_to_normal.html#sphx-glr-auto-examples-preprocessing-plot-map-data-to-normal-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id224) |  <br/> [功能离散](https://scikit-learn.org/stable/auto_examples/preprocessing/plot_discretization_classification.html#sphx-glr-auto-examples-preprocessing-plot-discretization-classification-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id225) |  <br/> [比较不同缩放器对数据与异常值的影响](https://scikit-learn.org/stable/auto_examples/preprocessing/plot_all_scaling.html#sphx-glr-auto-examples-preprocessing-plot-all-scaling-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id226) |
|
||||
|
||||
|
||||
## 发布要点
|
||||
|
||||
这些示例说明了scikit-learn发行版的主要功能。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [scikit-learn 0.22的发行要点](https://scikit-learn.org/stable/auto_examples/release_highlights/plot_release_highlights_0_22_0.html#sphx-glr-auto-examples-release-highlights-plot-release-highlights-0-22-0-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id227) |
|
||||
|
||||
|
||||
## 半监督分类
|
||||
|
||||
有关[`sklearn.semi_supervised`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.semi_supervised "sklearn.semi_supervised")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [Iris数据集上标签传播与SVM的决策边界](https://scikit-learn.org/stable/auto_examples/semi_supervised/plot_label_propagation_versus_svm_iris.html#sphx-glr-auto-examples-semi-supervised-plot-label-propagation-versus-svm-iris-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id228) |  <br/> [标签传播学习复杂的结构](https://scikit-learn.org/stable/auto_examples/semi_supervised/plot_label_propagation_structure.html#sphx-glr-auto-examples-semi-supervised-plot-label-propagation-structure-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id229) |  <br/> [标签传播数字:演示性能](https://scikit-learn.org/stable/auto_examples/semi_supervised/plot_label_propagation_digits.html#sphx-glr-auto-examples-semi-supervised-plot-label-propagation-digits-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id230) |  <br/> [标签传播数字主动学习](https://scikit-learn.org/stable/auto_examples/semi_supervised/plot_label_propagation_digits_active_learning.html#sphx-glr-auto-examples-semi-supervised-plot-label-propagation-digits-active-learning-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id231) |
|
||||
|
||||
|
||||
## 支持向量机
|
||||
|
||||
有关[`sklearn.svm`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.svm "sklearn.svm")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [非线性](https://scikit-learn.org/stable/auto_examples/svm/plot_svm_nonlinear.html#sphx-glr-auto-examples-svm-plot-svm-nonlinear-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id232) |  <br/> [SVM:最大余量分隔超平面](https://scikit-learn.org/stable/auto_examples/svm/plot_separating_hyperplane.html#sphx-glr-auto-examples-svm-plot-separating-hyperplane-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id233) |  <br/> [具有自定义内核的](https://scikit-learn.org/stable/auto_examples/svm/plot_custom_kernel.html#sphx-glr-auto-examples-svm-plot-custom-kernel-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id234) |  <br/> [在LinearSVC中绘制支持向量](https://scikit-learn.org/stable/auto_examples/svm/plot_linearsvc_support_vectors.html#sphx-glr-auto-examples-svm-plot-linearsvc-support-vectors-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id235) |
|
||||
|  <br/> [SVM中断示例](https://scikit-learn.org/stable/auto_examples/svm/plot_svm_tie_breaking.html#sphx-glr-auto-examples-svm-plot-svm-tie-breaking-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id236) |  <br/> [SVM:加权样本](https://scikit-learn.org/stable/auto_examples/svm/plot_weighted_samples.html#sphx-glr-auto-examples-svm-plot-weighted-samples-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id237) |  <br/> [SVM:为不平衡的类分离超平面](https://scikit-learn.org/stable/auto_examples/svm/plot_separating_hyperplane_unbalanced.html#sphx-glr-auto-examples-svm-plot-separating-hyperplane-unbalanced-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id238) |  <br/> [SVM内核](https://scikit-learn.org/stable/auto_examples/svm/plot_svm_kernels.html#sphx-glr-auto-examples-svm-plot-svm-kernels-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id239) |
|
||||
|  <br/> [SVM-Anova:具有单变量特征选择的](https://scikit-learn.org/stable/auto_examples/svm/plot_svm_anova.html#sphx-glr-auto-examples-svm-plot-svm-anova-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id240) |  <br/> [使用线性和非线性内核支持向量回归(SVR)](https://scikit-learn.org/stable/auto_examples/svm/plot_svm_regression.html#sphx-glr-auto-examples-svm-plot-svm-regression-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id241) |  <br/> [SVM保证金示例](https://scikit-learn.org/stable/auto_examples/svm/plot_svm_margin.html#sphx-glr-auto-examples-svm-plot-svm-margin-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id242) |  <br/> [具有非线性内核(RBF)的一类](https://scikit-learn.org/stable/auto_examples/svm/plot_oneclass.html#sphx-glr-auto-examples-svm-plot-oneclass-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id243) |
|
||||
|  <br/> [在虹膜数据集中绘制不同的SVM分类器](https://scikit-learn.org/stable/auto_examples/svm/plot_iris_svc.html#sphx-glr-auto-examples-svm-plot-iris-svc-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id244) |  <br/> [扩展SVC的正则化参数](https://scikit-learn.org/stable/auto_examples/svm/plot_svm_scale_c.html#sphx-glr-auto-examples-svm-plot-svm-scale-c-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id245) |  <br/> [RBF SVM参数](https://scikit-learn.org/stable/auto_examples/svm/plot_rbf_parameters.html#sphx-glr-auto-examples-svm-plot-rbf-parameters-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id246) |
|
||||
|
||||
|
||||
## 教程练习
|
||||
|
||||
教程练习。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [数字分类练习](https://scikit-learn.org/stable/auto_examples/exercises/plot_digits_classification_exercise.html#sphx-glr-auto-examples-exercises-plot-digits-classification-exercise-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id247) |  <br/> [交叉验证数字数据集练习](https://scikit-learn.org/stable/auto_examples/exercises/plot_cv_digits.html#sphx-glr-auto-examples-exercises-plot-cv-digits-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id248) |  <br/> [SVM练习](https://scikit-learn.org/stable/auto_examples/exercises/plot_iris_exercise.html#sphx-glr-auto-examples-exercises-plot-iris-exercise-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id249) |  <br/> [糖尿病运动数据集交叉验证](https://scikit-learn.org/stable/auto_examples/exercises/plot_cv_diabetes.html#sphx-glr-auto-examples-exercises-plot-cv-diabetes-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id250) |
|
||||
|
||||
|
||||
## 文本文档工作
|
||||
|
||||
有关[`sklearn.feature_extraction.text`](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.feature_extraction.text "sklearn.feature_extraction.text")模块的示例。
|
||||
|
||||
| | | | |
|
||||
| -- | -- | -- | -- |
|
||||
|  <br/> [FeatureHasher和DictVectorizer比较](https://scikit-learn.org/stable/auto_examples/text/plot_hashing_vs_dict_vectorizer.html#sphx-glr-auto-examples-text-plot-hashing-vs-dict-vectorizer-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id251) |  <br/> [使用k-means聚类文本文档](https://scikit-learn.org/stable/auto_examples/text/plot_document_clustering.html#sphx-glr-auto-examples-text-plot-document-clustering-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id252) |  <br/> [使用稀疏特征对文本文档进行分类](https://scikit-learn.org/stable/auto_examples/text/plot_document_classification_20newsgroups.html#sphx-glr-auto-examples-text-plot-document-classification-20newsgroups-py)[](https://scikit-learn.org/stable/auto_examples/index.html#id253)
|
||||
41
Sklearn/sklearn-doc-zh/examples/SUMMARY.md
Normal file
@@ -0,0 +1,41 @@
|
||||
* 其他示例
|
||||
* 双聚类
|
||||
* [频谱共聚算法演示](Biclustering/a_demo_of_the_spectral_co-clustering_algorithm.md)
|
||||
* [频谱双聚类算法演示](Biclustering/a_demo_of_the_spectral_clustering_algorithm.md)
|
||||
* [使用频谱共聚算法对文档进行聚合](Biclustering/biclustering_documents_with_the_spectral_co-clustering_algorithm.md)
|
||||
* 校准
|
||||
* 分类
|
||||
* 多聚类
|
||||
* 协方差估计
|
||||
* 交叉分解
|
||||
* 数据集示例
|
||||
* 决策树
|
||||
* 分解
|
||||
* 集成方法
|
||||
* 基于真实数据集的示例
|
||||
* 特征选择
|
||||
* 高斯混合模型
|
||||
* 高斯机器学习过程
|
||||
* 广义线性模型
|
||||
* [Lasso 和弹性网络在稀疏信号上的表现](Generalized_Linear_Models/plot_lasso_and_elasticnet.md)
|
||||
* [Lasso 和弹性网络](Generalized_Linear_Models/plot_lasso_coordinate_descent_path.md)
|
||||
* [Lasso 模型选择:交叉验证 / AIC / BIC](Generalized_Linear_Models/plot_lasso_model_selection.md)
|
||||
* [多任务 Lasso 实现联合特征选择](Generalized_Linear_Models/plot_multi_task_lasso_support.md)
|
||||
* [线性回归示例](Generalized_Linear_Models/plot_ols.md)
|
||||
* [岭系数对回归系数的影响](Generalized_Linear_Models/plot_ridge_path.md)
|
||||
* [压缩感知:用L1先验概率进行断层重建](Generalized_Linear_Models/plot_tomography_l1_reconstruction.md)
|
||||
* 检查
|
||||
* 流行学习
|
||||
* 缺失值插补
|
||||
* 选型
|
||||
* 多输出方法
|
||||
* 最近邻
|
||||
* 神经网络
|
||||
* 管道和复合估计器
|
||||
* 预处理
|
||||
* 发布要点
|
||||
* 半监督分类
|
||||
* 支持向量机
|
||||
* 建成练习
|
||||
* 文本文档工作
|
||||
* [分类特征稀疏的文本](Generalized_Linear_Models/plot_document_classification_20newsgroups.md)
|
||||
176
Sklearn/sklearn-doc-zh/examples/book.json
Normal file
@@ -0,0 +1,176 @@
|
||||
{
|
||||
"title" : "sklearn 中文文档",
|
||||
"author" : "ApacheCN",
|
||||
"description" : "sklearn 中文文档: 教程和文档",
|
||||
"language" : "zh-hans",
|
||||
"plugins": [
|
||||
"github",
|
||||
"github-buttons",
|
||||
"-sharing",
|
||||
"insert-logo",
|
||||
"sharing-plus",
|
||||
"back-to-top-button",
|
||||
"code",
|
||||
"copy-code-button",
|
||||
"katex",
|
||||
"pageview-count",
|
||||
"edit-link",
|
||||
"emphasize",
|
||||
"alerts",
|
||||
"auto-scroll-table",
|
||||
"popup",
|
||||
"hide-element",
|
||||
"page-toc-button",
|
||||
"tbfed-pagefooter",
|
||||
"sitemap",
|
||||
"advanced-emoji",
|
||||
"expandable-chapters",
|
||||
"splitter",
|
||||
"search-pro"
|
||||
],
|
||||
"pluginsConfig": {
|
||||
"github": {
|
||||
"url": "https://github.com/apachecn/sklearn-doc-zh"
|
||||
},
|
||||
"github-buttons": {
|
||||
"buttons": [
|
||||
{
|
||||
"user": "apachecn",
|
||||
"repo": "sklearn-doc-zh",
|
||||
"type": "star",
|
||||
"count": true,
|
||||
"size": "small"
|
||||
}
|
||||
]
|
||||
},
|
||||
"insert-logo": {
|
||||
"url": "http://data.apachecn.org/img/logo.jpg",
|
||||
"style": "background: none; max-height: 150px; min-height: 150px"
|
||||
},
|
||||
"hide-element": {
|
||||
"elements": [".gitbook-link"]
|
||||
},
|
||||
"edit-link": {
|
||||
"base": "https://github.com/apachecn/sklearn-doc-zh/blob/master/docs/examples",
|
||||
"label": "编辑本页"
|
||||
},
|
||||
"sharing": {
|
||||
"qzone": true,
|
||||
"weibo": true,
|
||||
"twitter": false,
|
||||
"facebook": false,
|
||||
"google": false,
|
||||
"qq": false,
|
||||
"line": false,
|
||||
"whatsapp": false,
|
||||
"douban": false,
|
||||
"all": [
|
||||
"qq", "douban", "facebook", "google", "linkedin", "twitter", "weibo", "whatsapp"
|
||||
]
|
||||
},
|
||||
"page-toc-button": {
|
||||
"maxTocDepth": 4,
|
||||
"minTocSize": 4
|
||||
},
|
||||
"tbfed-pagefooter": {
|
||||
"copyright":"Copyright © ibooker.org.cn 2019",
|
||||
"modify_label": "该文件修订时间: ",
|
||||
"modify_format": "YYYY-MM-DD HH:mm:ss"
|
||||
},
|
||||
"sitemap": {
|
||||
"hostname": "http://sklearn.apachecn.org"
|
||||
}
|
||||
},
|
||||
"my_links" : {
|
||||
"sidebar" : {
|
||||
"Home" : "https://www.baidu.com"
|
||||
}
|
||||
},
|
||||
"my_plugins": [
|
||||
"donate",
|
||||
"todo",
|
||||
"-lunr",
|
||||
"-search",
|
||||
"expandable-chapters-small",
|
||||
"chapter-fold",
|
||||
"expandable-chapters",
|
||||
"expandable-chapters-small",
|
||||
"back-to-top-button",
|
||||
"ga",
|
||||
"baidu",
|
||||
"sitemap",
|
||||
"tbfed-pagefooter",
|
||||
"advanced-emoji",
|
||||
"sectionx",
|
||||
"page-treeview",
|
||||
"simple-page-toc",
|
||||
"ancre-navigation",
|
||||
"theme-apachecn@git+https://github.com/apachecn/theme-apachecn#HEAD",
|
||||
"pagefooter-apachecn@git+https://github.com/apachecn/gitbook-plugin-pagefooter-apachecn#HEAD"
|
||||
],
|
||||
"my_pluginsConfig": {
|
||||
"github-buttons": {
|
||||
"buttons": [
|
||||
{
|
||||
"user": "apachecn",
|
||||
"repo": "sklearn-doc-zh",
|
||||
"type": "star",
|
||||
"count": true,
|
||||
"size": "small"
|
||||
},
|
||||
{
|
||||
"user": "apachecn",
|
||||
"width": "160",
|
||||
"type": "follow",
|
||||
"count": true,
|
||||
"size": "small"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ignores": ["node_modules"],
|
||||
"simple-page-toc": {
|
||||
"maxDepth": 3,
|
||||
"skipFirstH1": true
|
||||
},
|
||||
"page-toc-button": {
|
||||
"maxTocDepth": 2,
|
||||
"minTocSize": 2
|
||||
},
|
||||
"page-treeview": {
|
||||
"copyright": "Copyright © aleen42",
|
||||
"minHeaderCount": "2",
|
||||
"minHeaderDeep": "2"
|
||||
},
|
||||
"donate": {
|
||||
"wechat": "微信收款的二维码URL",
|
||||
"alipay": "支付宝收款的二维码URL",
|
||||
"title": "",
|
||||
"button": "赏",
|
||||
"alipayText": "支付宝打赏",
|
||||
"wechatText": "微信打赏"
|
||||
},
|
||||
"page-copyright": {
|
||||
"description": "modified at",
|
||||
"signature": "你的签名",
|
||||
"wisdom": "Designer, Frontend Developer & overall web enthusiast",
|
||||
"format": "YYYY-MM-dd hh:mm:ss",
|
||||
"copyright": "Copyright © 你的名字",
|
||||
"timeColor": "#666",
|
||||
"copyrightColor": "#666",
|
||||
"utcOffset": "8",
|
||||
"style": "normal",
|
||||
"noPowered": false
|
||||
},
|
||||
"ga": {
|
||||
"token": "UA-102475051-10"
|
||||
},
|
||||
"baidu": {
|
||||
"token": "75439e2cbd22bdd813226000e9dcc12f"
|
||||
},
|
||||
"pagefooter-apachecn": {
|
||||
"copyright":"Copyright © ibooker.org.cn 2019",
|
||||
"modify_label": "该文件修订时间: ",
|
||||
"modify_format": "YYYY-MM-DD HH:mm:ss"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 62 KiB |