一、机器学习概览
为什么使用机器学习?
机器学习善于:
- 需要进行大量手工调整或需要拥有长串规则才能解决的问题:机器学习算法通常可以简化代码、提高性能。
- 问题复杂,传统方法难以解决:最好的机器学习方法可以找到解决方案。
- 环境有波动:机器学习算法可以适应新数据。洞察复杂问题和大量数据
机器学习系统的类型
机器学习可以根据训练时监督的量和类型进行分类。主要有四类:监督学习、非监督学习、半监督学习和强化学习。
监督学习
一个典型的监督学习任务是分类。垃圾邮件过滤器就是一个很好的例子:用许多带有归类(垃圾邮件或普通邮件)的邮件样本进行训练,过滤器必须还能对新邮件进行分类。另一个典型任务是预测目标数值,例如给出一些特征(里程数、车龄、品牌等等)称作预测值,来预测一辆汽车的价格。
下面是一些重要的监督学习算法(本书都有介绍):
- K近邻算法
- 线性回归
- 逻辑回归
- 支持向量机(SVM)
- 决策树和随机森林
- 神经网络
非监督学习
在非监督学习中,训练数据是没有加标签的,系统在没有老师的条件下进行学习。
下面是一些最重要的非监督学习算法(我们会在第 8 章介绍降维):
聚类
K 均值
层次聚类分析(Hierarchical Cluster Analysis,HCA)
期望最大值
可视化和降维
主成分分析(Principal Component Analysis,PCA)
核主成分分析
局部线性嵌入(Locally-Linear Embedding,LLE)
t-分布邻域嵌入算法(t-distributed Stochastic Neighbor Embedding,t-SNE)
关联性规则学习
Apriori 算法
Eclat 算法
聚类:例如,假设你有一份关于你的博客访客的大量数据。你想运行一个聚类算法,检测相似访客的分组。例如,算法可能注意到 40% 的访客是喜欢漫画书的男性,通常是晚上访问,20% 是科幻爱好者,他们是在周末访问等等。如果你使用层次聚类分析,它