Files
2026-07-13 11:14:35 +00:00

443 lines
29 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- WEHUB_ZH_README -->
> [!NOTE]
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
> [English](./README.en.md) · [原始项目](https://github.com/rasbt/python-machine-learning-book) · [上游 README](https://github.com/rasbt/python-machine-learning-book/blob/HEAD/README.md)
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
# Python Machine Learning 图书代码仓库
[![Google Group](https://img.shields.io/badge/-Google%20Group-lightgrey.svg)](https://groups.google.com/forum/#!forum/python-machine-learning-reader-discussion-board)
---
#### 重要提示(2017/09/21):
本 GitHub 仓库包含《Python Machine Learning》**第 1 版**的代码示例。若你需要 **第 2 版**的代码示例,请参阅[](https://github.com/rasbt/python-machine-learning-book-2nd-edition#whats-new-in-the-second-edition-from-the-first-edition) 仓库。
---
本书共 400 页,内容丰富实用,涵盖入门机器学习所需的大部分知识……从理论到可直接付诸实践的代码!这绝非又一本“scikit-learn 用法手册”。我的目标是解释所有底层概念,告诉你最佳实践与注意事项,并主要通过 NumPy、scikit-learn 和 Theano 将这些概念付诸实践。
不确定这本书是否适合你?请查阅[序言](./docs/foreword_ro.pdf)和[前言](./docs/preface_sr.pdf)的节选,或查看 [FAQ](#faq) 部分了解更多信息。
---
[![](./images/pymle_cover_double_small.jpg)](https://www.amazon.com/Python-Machine-Learning-Sebastian-Raschka/dp/1783555130/ref=sr_1_1?ie=UTF8&qid=1470882464&sr=8-1&keywords=python+machine+learning)
第 1 版,2015 年 9 月 23 日出版<br>
平装:454 页<br>
出版社:Packt Publishing<br>
语言:英语<br>
ISBN-10: 1783555130<br>
ISBN-13: 978-1783555130<br>
Kindle ASIN: B00YSILNL0<br>
<br>
[![](./images/CRBadgeNotableBook.jpg)](http://www.computingreviews.com/recommend/bestof/notableitems.cfm?bestYear=2016)
<br>
德语 ISBN-13: 978-3958454224<br>
日语 ISBN-13: 978-4844380603<br>
意大利语 ISBN-13: 978-8850333974<br>
繁体中文 ISBN-13: 978-9864341405<br>
大陆简体 ISBN-13: 978-7111558804<br>
韩语 ISBN-13: 979-1187497035<br>
俄语 ISBN-13: 978-5970604090<br>
## 目录与代码 Notebook
只需点击各章标题旁的 `ipynb`/`nbviewer` 链接即可查看代码示例(目前,内部文档链接仅 NbViewer 版本支持)。
**请注意,这些只是我为方便大家上传的随书代码示例;若无公式与说明文字,这些 notebook 可能用处不大。**
- [序言](./docs/foreword_ro.pdf)与[前言](./docs/preface_sr.pdf)节选
- [配置 Python 与 Jupiter Notebook 的说明](./code/ch01/README.md)
<br>
1. 机器学习——赋予计算机从数据中学习的能力 [[dir](./code/ch01)] [[ipynb](./code/ch01/ch01.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch01/ch01.ipynb)]
2. 训练用于分类的机器学习算法 [[dir](./code/ch02)] [[ipynb](./code/ch02/ch02.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch02/ch02.ipynb)]
3. 使用 Scikit-Learn 的机器学习分类器概览 [[dir](./code/ch03)] [[ipynb](./code/ch03/ch03.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch03/ch03.ipynb)]
4. 构建优质训练集——数据预处理 [[dir](./code/ch04)] [[ipynb](./code/ch04/ch04.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch04/ch04.ipynb)]
5. 通过降维压缩数据 [[dir](./code/ch05)] [[ipynb](./code/ch05/ch05.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch05/ch05.ipynb)]
6. 学习模型评估与超参数调优的最佳实践 [[dir](./code/ch06)] [[ipynb](./code/ch06/ch06.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch06/ch06.ipynb)]
7. 组合不同模型进行集成学习 [[dir](./code/ch07)] [[ipynb](./code/ch07/ch07.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch07/ch07.ipynb)]
8. 将机器学习应用于情感分析 [[dir](./code/ch08)] [[ipynb](./code/ch08/ch08.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch08/ch08.ipynb)]
9. 将机器学习模型嵌入 Web 应用 [[dir](./code/ch09)] [[ipynb](./code/ch09/ch09.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch09/ch09.ipynb)]
10. 用回归分析预测连续目标变量 [[dir](./code/ch10)] [[ipynb](./code/ch10/ch10.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch10/ch10.ipynb)]
11. 处理无标签数据——聚类分析 [[dir](./code/ch11)] [[ipynb](./code/ch11/ch11.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch11/ch11.ipynb)]
12. 训练用于图像识别的人工神经网络 [[dir](./code/ch12)] [[ipynb](./code/ch12/ch12.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch12/ch12.ipynb)]
13. 通过 Theano 并行化神经网络训练 [[dir](./code/ch13)] [[ipynb](./code/ch13/ch13.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch13/ch13.ipynb)]
<br>
#### 公式参考
<a href="https://github.com/rasbt/python-machine-learning-book/tree/master/docs/equations"><img src="images/equation-ref-logo.png" width="200" height="200" /></a>
[[PDF](./docs/equations/pymle-equations.pdf)] [[TEX](./docs/equations/pymle-equations.tex)]
#### 教学幻灯片
衷心感谢 [Dmitriy Dligach](dmitriydligach) 分享其机器学习课程幻灯片,该课程目前在 [Loyola University Chicago](http://www.luc.edu/cs/). 开设。
- [https://github.com/dmitriydligach/PyMLSlides](https://github.com/dmitriydligach/PyMLSlides)
-
#### 补充数学与 NumPy 资源
一些读者询问数学与 NumPy 入门材料,因篇幅限制未收入本书。不过我最近为另一本书整理了此类资源,并自愿将这些*章节*免费在线提供,希望也能作为本书的有益背景材料:
- 代数基础 [[PDF](https://sebastianraschka.com/pdf/books/dlb/appendix_b_algebra.pdf)] [[EPUB](https://sebastianraschka.com/pdf/books/dlb/appendix_b_algebra.epub)]
- 微积分与微分入门 [[PDF](https://sebastianraschka.com/pdf/books/dlb/appendix_d_calculus.pdf)] [[EPUB](https://sebastianraschka.com/pdf/books/dlb/appendix_d_calculus.epub)]
- NumPy 入门 [[PDF](https://sebastianraschka.com/pdf/books/dlb/appendix_f_numpy-intro.pdf)] [[EPUB](https://sebastianraschka.com/pdf/books/dlb/appendix_f_numpy-intro.epub)] [[Code Notebook](https://github.com/rasbt/deep-learning-book/blob/master/code/appendix_f_numpy-intro/appendix_f_numpy-intro.ipynb)]
---
#### 引用本书
非常欢迎在科学出版物及其他作品中复用本书代码片段或其他内容;
若如此,恳请引用原始来源:
**BibTeX**
```
@Book{raschka2015python,
author = {Raschka, Sebastian},
title = {Python Machine Learning},
publisher = {Packt Publishing},
year = {2015},
address = {Birmingham, UK},
isbn = {1783555130}
}
```
**MLA**
Raschka, Sebastian. *Python machine learning*. Birmingham, UK: Packt Publishing, 2015. Print.
---
### [反馈与评论](./docs/feedback.md)
#### [简短书评摘录](./docs/feedback.md)
[![](./images/pymle_amzn.png)](https://www.amazon.com/Python-Machine-Learning-Sebastian-Raschka/dp/1783555130/ref=sr_1_1?ie=UTF8&qid=1472342570&sr=8-1&keywords=sebastian+raschka)
---
> *Sebastian Raschka 的新书《Python Machine Learning》刚刚出版。我有机会阅读了审阅版,结果正如我所料——非常棒!结构清晰、极易上手,不仅为聪明的非专业人士打下了良好基础,从业者也能从中获得灵感并学到新技巧。*
Lon Riesberg[Data Elixir](http://dataelixir.com/issues/55#start)
> *出色的工作!到目前为止,在我看来它在理论与实践的把握上恰到好处……数学与代码兼顾!*
[Brian Thomas](http://sebastianraschka.com/blog/2015/writing-pymle.html#comment-2295668894)
> *我(几乎)读过所有围绕 Scikit-learn 的机器学习书籍,这本无疑是其中最好的一本。*
[Jason Wolosonovich](https://www.linkedin.com/pulse/python-machine-learning-sebastian-raschka-review-jason-wolosonovich?trk=prof-post)
> *这是我见过的 PACKT Publishing 出品的最佳图书。这是一本写得非常好的 Python 机器学习入门书。正如其他人所指出的,理论与应用的结合堪称完美。*
[Josh D.](https://www.amazon.com/gp/customer-reviews/R27WB1GWTNGIR2/ref=cm_cr_getr_d_rvw_ttl?ie=UTF8&ASIN=1783555130)
> *一本很难得的、兼具多种优点的书:将掌控理论所需的数学与应用性的 Python 编码结合起来。也很高兴看到它没有像许多其他书那样,为了迎合更广泛的读者而浪费篇幅去介绍 Python 入门。可以看出它是由有见地的作者所写,而不只是 DIY 爱好者。*
[Amazon Customer](https://www.amazon.com/gp/customer-reviews/RZWY4TF66Z6V0/ref=cm_cr_getr_d_rvw_ttl?ie=UTF8&ASIN=1783555130)
> *Sebastian Raschka 创作了一份精彩的机器学习教程,将理论与实践相结合。该书从理论角度解释机器学习,并有大量代码示例展示如何实际运用机器学习技术。初学者或高级程序员都可以阅读。*
- William P. Ross[7 Must Read Python Books](http://williampross.com/7-must-read-python-books/)
#### 较长书评
如果你需要帮忙判断是否适合阅读本书,可以查看下方链接中的一些“较长”书评。(如果你写过书评,请告诉我,我很乐意将其加入列表。)
- [Python Machine Learning Review](http://www.bcs.org/content/conWebDoc/55586),作者 Patrick Hill,发表于英国特许信息技术学会(Chartered Institute for IT
- [Book Review: Python Machine Learning by Sebastian Raschka](http://whatpixel.com/python-machine-learning-book-review/),作者 Alex Turner,发表于 WhatPixel
---
## 链接
- 电子书与纸质书:[Amazon.com](http://www.amazon.com/Python-Machine-Learning-Sebastian-Raschka/dp/1783555130/ref=sr_1_2?ie=UTF8&qid=1437754343&sr=8-2&keywords=python+machine+learning+essentials), [Amazon.co.uk](http://www.amazon.co.uk/Python-Machine-Learning-Sebastian-Raschka/dp/1783555130), [Amazon.de](http://www.amazon.de/s/ref=nb_sb_noss_2?__mk_de_DE=ÅMÅŽÕÑ&url=search-alias%3Daps&field-keywords=python+machine+learning)
- [电子书与纸质书](https://www.packtpub.com/big-data-and-business-intelligence/python-machine-learning),来自出版社 Packt
- 其他书店:[Google Books](https://books.google.com/books?id=GOVOCwAAQBAJ&source=gbs_slider_cls_metadata_7_mylibrary), [O'Reilly](http://shop.oreilly.com/product/9781783555130.do), [Safari](https://www.safaribooksonline.com/library/view/python-machine-learning/9781783555130/), [Barnes & Noble](http://www.barnesandnoble.com/w/python-machine-learning-essentials-sebastian-raschka/1121999969?ean=9781783555130), [Apple iBooks](https://itunes.apple.com/us/book/python-machine-learning/id1028207310?mt=11), ...
- 社交平台:[Goodreads](https://www.goodreads.com/book/show/25545994-python-machine-learning)
#### 译本
- [意大利语译本](https://www.amazon.it/learning-Costruire-algoritmi-generare-conoscenza/dp/8850333978/),经 "Apogeo" 出版
- [德语译本](https://www.amazon.de/Machine-Learning-Python-mitp-Professional/dp/3958454224/),经 "mitp Verlag" 出版
- [日语译本](http://www.amazon.co.jp/gp/product/4844380605/),经 "Impress Top Gear" 出版
- [中文译本(繁体中文)](https://taiwan.kinokuniya.com/bw/9789864341405)
- [中文译本(简体中文)](https://book.douban.com/subject/27000110/)
- [韩语译本](http://www.kyobobook.co.kr/product/detailViewKor.laf?mallGb=KOR&ejkGb=KOR&barcode=9791187497035),经 "Kyobo" 出版
- [波兰语译本](https://www.amazon.de/Python-Uczenie-maszynowe-Sebastian-Raschka/dp/8328336138/ref=sr_1_11?ie=UTF8&qid=1513601461&sr=8-11&keywords=sebastian+raschka),经 "Helion" 出版
---
### [文献参考与延伸阅读资源](./docs/references.md)
### [勘误](./docs/errata.md)
---
### 附赠 Notebook(书中未收录)
- Logistic Regression Implementation [[dir](./code/bonus)] [[ipynb](./code/bonus/logistic_regression.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/bonus/logistic_regression.ipynb)]
- A Basic Pipeline and Grid Search Setup [[dir](./code/bonus)] [[ipynb](./code/bonus/svm_iris_pipeline_and_gridsearch.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/bonus/svm_iris_pipeline_and_gridsearch.ipynb)]
- An Extended Nested Cross-Validation Example [[dir](./code/bonus)] [[ipynb](./code/bonus/nested_cross_validation.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/bonus/nested_cross_validation.ipynb)]
- A Simple Barebones Flask Webapp Template [[view directory](./code/bonus/flask_webapp_ex01)][[download as zip-file](https://github.com/rasbt/python-machine-learning-book/raw/master/code/bonus/flask_webapp_ex01/flask_webapp_ex01.zip)]
- Reading handwritten digits from MNIST into NumPy arrays [[GitHub ipynb](./code/bonus/reading_mnist.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/bonus/reading_mnist.ipynb)]
- Scikit-learn Model Persistence using JSON [[GitHub ipynb](./code/bonus/scikit-model-to-json.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/bonus/scikit-model-to-json.ipynb)]
- Multinomial logistic regression / softmax regression [[GitHub ipynb](./code/bonus/softmax-regression.ipynb)] [[nbviewer](http://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/bonus/softmax-regression.ipynb)]
<hr>
**"相关内容"(书中未收录)**
- [Model evaluation, model selection, and algorithm selection in machine learning - Part I](http://sebastianraschka.com/blog/2016/model-evaluation-selection-part1.html)
- [Model evaluation, model selection, and algorithm selection in machine learning - Part II](http://sebastianraschka.com/blog/2016/model-evaluation-selection-part2.html)
- [Model evaluation, model selection, and algorithm selection in machine learning - Part III](http://sebastianraschka.com/blog/2016/model-evaluation-selection-part3.html)
---
#### SciPy 2016
我们在奥斯汀参加的 [SciPy 2016](http://scipy2016.scipy.org/ehome/index.php?eventid=146062&tabid=332930&) 度过了非常愉快的时光!能与这么多本书的读者见面交流,真是莫大的荣幸。非常感谢大家的赞誉与反馈!如果你错过了,Andreas Mueller 和我曾做过一场 **Introduction to Machine Learning with Scikit-learn**;如果你感兴趣,[Part I](https://www.youtube.com/watch?v=OB1reY6IX-o&index=91&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6) 和 [Part II](https://www.youtube.com/watch?v=Cte8FYCpylk&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6&index=90) 的视频录像现已上线!
[![](images/scipy2016.jpg)](https://www.youtube.com/watch?v=OB1reY6IX-o&index=91&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6)
#### PyData Chicago 2016
我曾在 PyData Chicago 2016 上尝试完成一项颇具挑战的任务:在*仅仅* 90 分钟内介绍 scikit-learn 与机器学习(machine learning)。幻灯片与教程材料可在「[Learning scikit-learn -- An Introduction to Machine Learning in Python](https://github.com/rasbt/pydata-chicago2016-ml-tutorial).」获取。
---
**说明**
我另外搭建了一个独立库 [`mlxtend`](http://rasbt.github.io/mlxtend/),,其中包含更多机器学习(以及一般意义上的「数据科学」)算法的实现。我还加入了本书中的若干实现(例如决策区域图、人工神经网络,以及序列特征选择算法),并补充了额外功能。
[![](./images/mlxtend_logo.png)](http://rasbt.github.io/mlxtend/)
<br>
<hr>
### 译本
[![](./images/pymle-cover_it.jpg)](https://www.amazon.it/learning-Costruire-algoritmi-generare-conoscenza/dp/8850333978/)
[![](./images/pymle-cover_de.jpg)](https://www.amazon.de/Machine-Learning-Python-mitp-Professional/dp/3958454224/)
[![](./images/pymle-cover_jp.jpg)](http://www.amazon.co.jp/gp/product/4844380605/)
[![](./images/pymle-cover_cn.jpg)](https://taiwan.kinokuniya.com/bw/9789864341405)
[![](./images/pymle-cover_cn_mainland.jpg)](https://book.douban.com/subject/27000110/)
[![](./images/pymle-cover_kr.jpg)](http://www.kyobobook.co.kr/product/detailViewKor.laf?ejkGb=KOR&mallGb=KOR&barcode=9791187497035&orderClick=LEA&Kc=)
[![](./images/pymle-cover_ru.jpg)](http://www.ozon.ru/context/detail/id/140152222/)
[![](./images/pymle-cover_pl.jpg)](https://www.amazon.de/Python-Uczenie-maszynowe-Sebastian-Raschka/dp/8328336138/ref=sr_1_11?ie=UTF8&qid=1513601461&sr=8-11&keywords=sebastian+raschka)
<hr>
---
***亲爱的读者们***
首先,我要感谢大家对本书的大力支持!我非常高兴收到你们迄今为止发来的诸多精彩反馈,也很欣慰这本书能对广大读者如此有用。
过去几个月里,我收到了数百封邮件,并尽力在有限时间内尽可能多地回复。为了让这些回答也能惠及其他读者,我将其中许多内容整理进了下方的 FAQ 部分。
此外,有些人询问是否有供读者讨论本书内容的平台。我希望这能为大家提供一个与其他读者交流、分享知识的机会:
#### [Google Groups 讨论区](https://groups.google.com/forum/#!forum/python-machine-learning-reader-discussion-board)
(若时间允许,我也会尽力亲自回答问题!:))
> 对于好建议,唯一该做的事就是把它传递下去。它对自己从来毫无用处。
— Oscar Wilde
---
## 读者示例与应用
再次向大家对本书的积极反馈致以(大大的!)感谢。我收到许多读者来信,他们将本书的概念与示例付诸实践,并在各自项目中善加运用。在本节中,我开始收集其中一些精彩应用;若你愿意,我很乐意把你的项目也加入这份列表——发封简短邮件即可!
- [40 个光学字符识别(Optical Character Recognition)脚本](https://github.com/rrlyman/PythonMachineLearingExamples),作者 [Richard Lyman](https://github.com/rrlyman)
- [代码实验](https://github.com/jeremyn/python-machine-learning-book),作者 [Jeremy Nation](https://github.com/jeremyn)
- [从零用 Python 实现分类器,我学到了什么](http://www.jeannicholashould.com),作者 [Jean-Nicholas Hould](http://www.jeannicholashould.com)
## FAQ
### 一般问题
- [什么是机器学习与数据科学?](./faq/datascience-ml.md)
- [为什么你和其他人有时会从零实现机器学习算法?](./faq/implementing-from-scratch.md)
- [在数据科学中,我应专注于哪条学习路径/学科方向?](./faq/data-science-career.md)
- [应在何时开始为开源项目做贡献?](./faq/open-source.md)
- [你认为拥有导师对学习过程有多重要?](./faq/mentor.md)
- [围绕数据科学/机器学习或 Python 的最佳在线社区有哪些?](./faq/ml-python-communities.md)
- [你会如何向软件工程师解释机器学习?](./faq/ml-to-a-programmer.md)
- [你为机器学习初学者设计的课程大纲会是什么样?](./faq/ml-curriculum.md)
- [数据科学的定义是什么?](./faq/definition_data-science.md)
- [数据科学家如何进行模型选择?这与 Kaggle 有何不同?](./faq/model-selection-in-datascience.md)
### 关于机器学习领域的问题
- [人工智能(Artificial Intelligence)与机器学习有何关联?](./faq/ai-and-ml.md)
- [机器学习在该领域有哪些真实世界应用示例?](./faq/ml-examples.md)
- [数据挖掘(data mining)包含哪些不同的研究领域?](./faq/datamining-overview.md)
- [机器学习与数据挖掘这两个领域的研究性质有何差异?](./faq/datamining-vs-ml.md)
- [如何判断一个问题能否通过机器学习解决?](./faq/ml-solvable.md)
- [机器学习的起源是什么?](./faq/ml-origins.md)
- [分类器作为学习机器是如何发展起来的?](./faq/classifier-history.md)
- [哪些机器学习算法可被视为最佳之列?](./faq/best-ml-algo.md)
- [分类器有哪些大类?](./faq/classifier-categories.md)
- [分类器(classifier)与模型(model)有何区别?](./faq/difference_classifier_model.md)
- [参数学习算法(parametric learning algorithm)与非参数学习算法(nonparametric learning algorithm)有何区别?](./faq/parametric_vs_nonparametric.md)
- [机器学习中代价函数(cost function)与损失函数(loss function)有何区别?](./faq/cost-vs-loss.md)
### 关于机器学习概念与统计学的问题
##### 代价函数与优化
- [通过闭式方程拟合模型 vs. 梯度下降(Gradient Descentvs 随机梯度下降(Stochastic Gradient Descentvs 小批量学习(Mini-Batch Learning)——有何区别?](./faq/closed-form-vs-gd.md)
- [如何推导线性回归(Linear Regression)与 Adaline 的梯度下降规则?](./faq/linear-gradient-derivative.md)
##### 回归分析
- [Pearson R 与简单线性回归(Simple Linear Regression)有何区别?](./faq/pearson-r-vs-linear-regr.md)
##### 树模型
- [随机森林(random forest)模型如何工作?它与集成模型中的 bagging 和 boosting 有何不同?](./faq/bagging-boosting-rf.md)
- [对大型数据集使用经典决策树算法有哪些缺点?](./faq/decision-tree-disadvantages.md)
- [为什么决策树算法的实现通常是二分的?不同不纯度指标各有何优势?](./faq/decision-tree-binary.md)
- [为什么我们通过熵(entropy)而非分类误差来生长决策树?](./faq/decisiontree-error-vs-entropy.md)
- [随机森林何时可能表现极差?](./faq/random-forest-perform-terribly.md)
##### 模型评估
- [什么是过拟合(overfitting)?](./faq/overfitting.md)
- [如何避免过拟合?](./faq/avoid-overfitting.md)
- [进行交叉验证(cross validation)时,折数(fold)是否越多越好?](./faq/number-of-kfolds.md)
- [训练 SVM 分类器时,支持向量(support vector)数量多些好还是少些好?](./faq/num-support-vectors.md)
- [如何评估模型?](./faq/evaluate-a-model.md)
- [多类分类(multi-class classification)的最佳验证指标是什么?](./faq/multiclass-metric.md)
- [选择预测建模技术时应考虑哪些因素?](./faq/choosing-technique.md)
- [哪些最佳玩具数据集有助于可视化并理解分类器行为?](./faq/clf-behavior-data.md)
- [如何选择 SVM 核函数(kernel)?](./faq/select_svm_kernels.md)
- [插曲:在交叉验证中比较与计算性能指标——类别不平衡问题与计算 F1 分数的 3 种不同方法](./faq/computing-the-f1-score.md)
##### 逻辑回归(Logistic Regression
- [什么是 Softmax 回归?它与逻辑回归有何关系?](./faq/softmax_regression.md)
- [为什么逻辑回归被视为线性模型?](./faq/logistic_regression_linear.md)
- [正则化逻辑回归的概率解释是什么?](./faq/probablistic-logistic-regression.md)
- [逻辑回归中的正则化是否总能带来更好的拟合和更好的泛化?](./faq/regularized-logistic-regression-performance.md)
- [朴素贝叶斯(Naive Bayes)与逻辑回归的主要区别是什么?](./faq/naive-bayes-vs-logistic-regression.md)
- [在机器学习语境下,"softmax 与多项逻辑损失(multinomial logistic loss"究竟指什么?](./faq/softmax.md)
- [逻辑回归与神经网络有何关系?应何时选用哪一种?](./faq/logisticregr-neuralnet.md)
- [逻辑回归:为何使用 sigmoid 函数?](./faq/logistic-why-sigmoid.md)
- [逻辑回归是否存在类似线性回归正规方程(Normal Equation)的解析解?](./faq/logistic-analytical.md)
##### 神经网络与深度学习(Neural Networks and Deep Learning
- [深度学习与常规机器学习有何区别?](./faq/difference-deep-and-normal-learning.md)
- [能否用可视化方式解释神经网络的反向传播(back propagation)算法?](./faq/visual-backpropagation.md)
- [为何深度网络的发明花了这么长时间?](./faq/inventing-deeplearning.md)
- [学习深度学习有哪些好书/论文?](./faq/deep-learning-resources.md)
- [为何深度学习库如此之多?](./faq/many-deeplearning-libs.md)
- [为何有人反感神经网络/深度学习?](./faq/deeplearning-criticism.md)
- [如何判断深度学习是否比 SVM 或随机森林更适合某个具体问题?](./faq/deeplearn-vs-svm-randomforest.md)
- [神经网络误差上升时问题出在哪里?](./faq/neuralnet-error.md)
- [如何调试人工神经网络算法?](./faq/nnet-debugging-checklist.md)
- [感知机(Perceptron)、Adaline 与神经网络模型有何区别?](./faq/diff-perceptron-adaline-neuralnet.md)
- [Dropout 技术的基本思路是什么?](./faq/dropout.md)
##### 其他监督学习算法
- [为何最近邻(Nearest Neighbor)是惰性算法(Lazy Algorithm)?](./faq/lazy-knn.md)
##### 无监督学习(Unsupervised Learning
- [聚类(clustering)有哪些常见问题?](./faq/issues-with-clustering.md)
##### 半监督学习(Semi-Supervised Learning
- [半监督学习相比监督学习与无监督学习有哪些优势?](./faq/semi-vs-supervised.md)
##### 集成方法(Ensemble Methods
- [用 Stacking 组合分类器是否优于只选最优的那一个?](./faq/logistic-boosting.md)
##### 预处理、特征选择与特征提取
- [为何需要用训练集拟合的参数来变换测试数据?](./faq/scale-training-test.md)
- [机器学习中有哪些降维(dimensionality reduction)方法?](./faq/dimensionality-reduction.md)
- [降维时 LDA 与 PCA 有何区别?](./faq/lda-vs-pca.md)
- [何时应进行数据归一化/标准化(normalization/standardization)?](./faq/when-to-standardize.md)
- [均值中心化或特征缩放会影响主成分分析(Principal Component Analysis)吗?](./faq/pca-scaling.md)
- [面对特征数量很多的机器学习问题,该如何着手?](./faq/large-num-features.md)
- [处理缺失数据有哪些常见做法?](./faq/missing-data.md)
- [特征选择的 filter、wrapper 与 embedded 方法有何区别?](./faq/feature_sele_categories.md)
- [数据准备/预处理是否应算作特征工程的一部分?为什么?](./faq/dataprep-vs-dataengin.md)
- [文本分类中的词袋(bag of words)特征表示是否可视为稀疏矩阵?](./faq/bag-of-words-sparsity.md)
##### 朴素贝叶斯(Naive Bayes
- [为何朴素贝叶斯分类器被称为 "naive"](./faq/naive-naive-bayes.md)
- [朴素贝叶斯的决策边界是什么?](./faq/naive-bayes-boundary.md)
- [朴素贝叶斯分类器能否用于混合变量类型?](./faq/naive-bayes-vartypes.md)
- [朴素贝叶斯能否混合不同变量类型,例如二值特征与连续特征?](./naive-bayes-vartypes.md)
##### 其他
- [从机器学习角度看,欧氏距离(Euclidean distance)是什么?](./faq/euclidean-distance.md)
- [何时应使用中位数,而非均值或平均数?](./faq/median-vs-mean.md)
##### 数据科学与机器学习的编程语言与库
- [R 语言如今是否仍广泛用于数据科学?](./faq/r-in-datascience.md)
- [TensorFlow 与 scikit-learn 的主要区别是什么?](./faq/tensorflow-vs-scikitlearn.md)
<br>
### 关于本书的问题
- [我能否在演示或博客中使用书中的段落与图片?](./faq/copyright.md)
- [本书与其他机器学习书籍有何不同?](./faq/different.md)
- [代码示例使用的是哪个 Python 版本?](./faq/py2py3.md)
- [使用了哪些技术与库?](./faq/technologies.md)
- [你推荐哪个版本/格式的书?](./faq/version.md)
- [为何选择 Python 做机器学习?](./faq/why-python.md)
- [代码示例中为何使用这么多前导与尾随下划线?](./faq/underscore-convention.md)
- [代码示例中 `return self` 惯用法有何用途?](./faq/return_self_idiom.md)
- [有哪些先修要求与推荐阅读?](./faq/prerequisites.md)
- [如何将 SVM 用于分类数据?](./faq/svm_for_categorical.md)
## 联系方式
我很乐意回答问题!请给我写[邮件](mailto:mail@sebastianraschka.com)
,或在 [Google Groups 邮件列表](https://groups.google.com/forum/#!forum/python-machine-learning-book). 上提问。
若想保持联系,我的 Twitter ([@rasbt](https://twitter.com/rasbt)) 上常有数据科学与机器学习相关动态。我还在[博客](http://sebastianraschka.com/articles.html) 分享我特别感兴趣的内容。