我们这么来说吧,监督式学习是在被告诉过了正确的答案后的学习,而非监督式学习是在没有被告诉正确答案时的学习。所以,非监督式学习是在大量的非常乱的数据中找寻一些潜在的关系,这个成本也比较高。非监督式学习经常被用来检测一些不正常的事情发生,比如信用卡的诈骗或是盗刷。也被用在推荐系统,比如买了这个商品的人又买了别的什么商品,或是如果某个人喜欢某篇文章、某个音乐、某个餐馆,那么他可能会喜欢某个车、某个明星或某个地方。
在监督式学习算法下,我们可以用一组“狗”的照片来确定某个照片中的物体是不是狗。而在非监督式学习算法下,我们可以通过一个照片来找到其中有与其相似的事物的照片。这两种学习方式都有些有用的场景。
关于机器学习,你可以读一读 [Machine Learning is Fun!](https://medium.com/@ageitgey/machine-learning-is-fun-80ea3ec3c471) ,这篇文章([中文翻译版](https://zhuanlan.zhihu.com/p/24339995))恐怕是全世界最简单的入门资料了。
- [Data Science Simplified Part 1: Principles and Process](https://becominghuman.ai/data-science-simplified-principles-and-process-b06304d63308)
- [Data Science Simplified Part 2: Key Concepts of Statistical Learning](https://towardsdatascience.com/data-science-simplified-key-concepts-of-statistical-learning-45648049709e)
- [Data Science Simplified Part 3: Hypothesis Testing](https://towardsdatascience.com/data-science-simplified-hypothesis-testing-56e180ef2f71)
- [Data Science Simplified Part 4: Simple Linear Regression Models](https://towardsdatascience.com/data-science-simplified-simple-linear-regression-models-3a97811a6a3d)
- [Data Science Simplified Part 5: Multivariate Regression Models](https://towardsdatascience.com/data-science-simplified-part-5-multivariate-regression-models-7684b0489015)
- [Data Science Simplified Part 6: Model Selection Methods](https://towardsdatascience.com/data-science-simplified-part-6-model-selection-methods-2511cbdf7cb0)
- [Data Science Simplified Part 7: Log-Log Regression Models](https://towardsdatascience.com/data-science-simplified-part-7-log-log-regression-models-499ecd1495f0)
- [Data Science Simplified Part 8: Qualitative Variables in Regression Models](https://towardsdatascience.com/data-science-simplified-part-8-qualitative-variables-in-regression-models-d1817d56245c)
- [Data Science Simplified Part 9: Interactions and Limitations of Regression Models](https://towardsdatascience.com/data-science-simplified-part-9-interactions-and-limitations-of-regression-models-4702dff03820)
- [Data Science Simplified Part 10: An Introduction to Classification Models](https://towardsdatascience.com/data-science-simplified-part-10-an-introduction-to-classification-models-82490f6c171f)
- [Data Science Simplified Part 11: Logistic Regression](https://towardsdatascience.com/data-science-simplified-part-11-logistic-regression-5ae8d994bf0e)
# 相关课程
接下来,我们需要比较专业地学习一下机器学习了。
在学习机器学习之前,我们需要学习数据分析,所以,我们得先学一些大数据相关的东西,也就是Data Science相关的内容。下面是两个不错的和数据科学相关的教程以及一个资源列表。
[UC Berkeley’s Data 8: The Foundations of Data Science](http://data8.org/) 和电子书 [Computational and Inferential Thinking](https://www.inferentialthinking.com/) 会讲述数据科学方面非常关键的概念,会教你在数据中找到数据的关联、预测和相关的推断。
[Learn Data Science](https://github.com/nborwankar/LearnDataScience) ,这是GitHub上的一本电子书,主要是一些数据挖掘的算法,比如线性回归、逻辑回归、随机森林、K-Means聚类的数据分析。然后,[donnemartin/data-science-ipython-notebooks](https://github.com/donnemartin/data-science-ipython-notebooks#scikit-learn) 这个代码仓库中用TensorFlow、scikit-learn、Pandas、NumPy、Spark等把这些经典的例子实现了个遍。
[Deep Learning by Google](https://www.udacity.com/course/deep-learning--ud730) ,Google的一个关于深度学习的在线免费课程,其支持中英文。这门课会教授你如何训练和优化基本神经网络、卷积神经网络和长短期记忆网络。你将通过项目和任务接触完整的机器学习系统TensorFlow。
《[Pattern Recognition and Machine Learning](https://book.douban.com/subject/2061116/)》,这本书是机器学习领域的圣经之作。该书也是众多高校机器学习研究生课程的教科书,Google上有[PDF版的下载](http://users.isr.ist.utl.pt/~wurmd/Livros/school/Bishop%20-%20Pattern%20Recognition%20And%20Machine%20Learning%20-%20Springer%20%202006.pdf)。这本书很经典,但并不适合入门来看。GitHub上有这本中的 [Matlab 实现](https://github.com/PRML/PRMLT)。
下面这两本电子书也是比较经典的,其中讲了很多机器学习的知识,可以当做手册或字典。
- 《[Understanding Machine Learning: From Theory to Algorithms](https://www.cs.huji.ac.il/~shais/UnderstandingMachineLearning/understanding-machine-learning-theory-algorithms.pdf)》。
- 《[The Elements of Statistical Learning - Second Edition](https://web.stanford.edu/~hastie/Papers/ESLII.pdf)》。
《[Deep Learning: Adaptive Computation and Machine Learning series](https://book.douban.com/subject/27087503/)》 中文翻译为《深度学习》。这本书由全球知名的三位专家伊恩·古德费洛(Ian Goodfellow)、友华·本吉奥(Yoshua Bengio)和亚伦·考维尔(Aaron Courville)撰写,是深度学习领域奠基性的经典教材。
全书内容包括3部分:第1部分介绍基本的数学工具和机器学习的概念,它们是深度学习的预备知识;第2部分系统深入地讲解现今已成熟的深度学习方法和技术;第3部分讨论某些具有前瞻性的方向和想法,它们被公认为是深度学习未来的研究重点。这本书的官网为 “[deeplearningbook.org](http://www.deeplearningbook.org/)”,在GitHub上也有中文翻译 - 《[Deep Learning 中文翻译](https://github.com/exacity/deeplearningbook-chinese)》。
《[Neural Networks and Deep Learning](http://neuralnetworksanddeeplearning.com/)》([中文翻译版](https://tigerneil.gitbooks.io/neural-networks-and-deep-learning-zh/content/)),这是一本非常不错的神经网络的入门书,在[豆瓣上评分9.5分](https://book.douban.com/subject/26727997/),从理论讲到了代码。虽然有很多数学公式,但是有代码相助,就不难理解了。其中讲了很多如激活函数、代价函数、随机梯度下降、反向传播、过度拟合和规范化、权重初始化、超参数优化、卷积网络的局部感受野、混合层、特征映射的东西。
《[Introduction to Machine Learning with Python](https://book.douban.com/subject/26279609/)》,算是本不错的入门书,也是本比较易读的英文书。其是以Scikit-Learn框架来讲述的。如果你用过Scikit这个框架,那么你学这本书还是很不错的。
《[Hands-On Machine Learning with Scikit-Learn and TensorFlow](https://book.douban.com/subject/26840215/) 》,这是一门以TensorFlow为工具的入门书,其用丰富的例子从实站的角度来让你学习。这本书对于无基础的人也是适合的,对于小白来说虽然略难但是受益匪浅。
# 相关文章
除了上述的那些课程和图书外,下面这些文章也很不错。
YouTube 上的 Google Developers 的 [Machine Learning Recipes with Josh Gordon](https://www.youtube.com/playlist?list=PLOU2XLYxmsIIuiBfYad6rFYQU_jL2ryal) ,这9集视频,每集不到10分钟,从Hello World讲到如何使用TensorFlow,非常值得一看。
还有 [Practical Machine Learning Tutorial with Python Introduction](https://pythonprogramming.net/machine-learning-tutorial-python-introduction/) 上面一系列的用Python带着你玩Machine Learning的教程。
[奇异值分解(Singular Value Decomposition,SVD)](https://en.wikipedia.org/wiki/Singular-value_decomposition)。实际上,PCA是SVD的一个简单应用。在计算机视觉中,第一个人脸识别算法使用PCA和SVD来将面部表示为"特征面"的线性组合,进行降维,然后通过简单的方法将面部匹配到身份。虽然现代方法更复杂,但很多方面仍然依赖于类似的技术。
如果你想了解更全的机器学习的算法列表,你可以看一下Wikipedia上的 [List of Machine Learning Algorithms](https://en.wikipedia.org/wiki/Outline_of_machine_learning#Machine_learning_algorithms)。
在 [A Tour of Machine Learning Algorithms](https://machinelearningmastery.com/a-tour-of-machine-learning-algorithms/) ,这篇文章带你概览了一些机器学习算法,其中还有一个"脑图"可以下载,并还有一些How-To的文章供你参考。
对于这些算法,[SciKit-Learn](http://scikit-learn.org/stable/)有一些文档供你学习。
- [1. Supervised learning](http://scikit-learn.org/stable/supervised_learning.html#supervised-learning)
- [2.3 Clustering](http://scikit-learn.org/stable/modules/clustering.html#clustering)
- [2.5. Decomposing signals in components (matrix factorization problems)](http://scikit-learn.org/stable/modules/decomposition.html#decompositions)
- [3. Model selection and evaluation](http://scikit-learn.org/stable/model_selection.html#model-selection)
- [4.3. Preprocessing data](http://scikit-learn.org/stable/modules/preprocessing.html#preprocessing)
# 相关资源
对于初学者来说,动手是非常非常重要的,不然,你会在理论的知识里迷失掉自己,这里有篇文章"[8 Fun Machine Learning Projects for Beginners](https://elitedatascience.com/machine-learning-projects-for-beginners)",其中为初学者准备了8个很有趣的项目,你可以跟着练练。
学习机器学习或是人工智能你需要数据,这里有一个非常足的列表给你足够多的公共数据 – 《[Awesome Public Datasets](https://github.com/awesomedata/awesome-public-datasets)》,其中包括农业、生物、天气、计算机网络、地球科学、经济、教育、金融、能源、政府、健康、自然语言、体育等。
GitHub上的一些Awesome资源列表。
- [Awesome Deep Learning](https://github.com/ChristosChristofidis/awesome-deep-learning)
- [Awesome - Most Cited Deep Learning Papers](https://github.com/terryum/awesome-deep-learning-papers)
- [Awesome Deep learning papers and other resources](https://github.com/endymecy/awesome-deeplearning-resources)
# 小结
总结一下今天的内容。我首先介绍了机器学习的基本原理:监督式学习和非监督式学习,然后给出了全世界最简单的入门资料 [Machine Learning is Fun!](https://medium.com/@ageitgey/machine-learning-is-fun-80ea3ec3c471)。随后给出了与机器学习密切相关的数据分析方面的内容和资料,然后推荐了深入学习机器学习知识的在线课程、图书和文章等,尤其列举了神经网络方面的学习资料。最后描述了机器学习的十大经典算法及相关的学习资料。
在机器学习和人工智能领域,我也在学习,也处于入门阶段,所以本文中推荐的内容,可能在你看来会有些浅。如果你有更好的信息和资料,欢迎补充。目前文章中给出来的是,我在学习过程中认为很不错的内容,我从中受益良多,所以希望它们也能为你的学习提供帮助。
从下篇文章开始,我们将进入前端知识的学习,包括基础和底层原理、性能优化、前端框架、UI/UX设计等内容。敬请期待。
下面是《程序员练级攻略》系列文章的目录。
- [开篇词](https://time.geekbang.org/column/article/8136)