代码改变世界

SciKit-Learn & TensorFlow 学习笔记(二)

2018-07-28 09:51  雄风狂飙  阅读(122)  评论(0)    收藏  举报

机器学习全景图

1.什么是机器学习

field of study that gives computers the ability to learn without being explicitly programmed.--Arthur Samuel,1959

A computer program is said to learn from experience E with respect to some task T and some performance measure P,if its performance on T,as measured by P,improves with experience E.--Tom Mitchell,1997

2.为什么使用机器学习

     1).可以简化那些需要硬编码的问题

     2).传统方法无法解决的那些问题,可以通过机器学习解决

     3).对于不断变化的环境,机器学习模型可以很好的适应

     4).可以更好处理大数据和复杂问题

3.机器学习的分类

    1)是否是有师的,或者是监督的

    2)是否可以在线学习

    3)是否是基于实例的,还是基于模型的

4.监督/无监督学习

    1)监督学习--已有的数据是有标签的。

          a) KNN

          b) linear regression

          c) logistic regression

          d) SVM(support vector machine)

          e) decision trees and random forests

          f) some of Neural networks

    2)无监督学习--数据是没有标签的。

         a) clustering

              K-means

              hierarchical cluster analysis

             expectation maximization

        b) visualization and dimensionality reduction

             principal component analysis(PCA)

             kernal PCA

            locally-linear embedding

            t-distribution stochastic nerghbor embedding(t-SNE)

        c)association rule learning

           apriori

           eclat

    3)半监督学习 semisupervised learning

    4)reinforcement learning

5.在线学习/批量学习

     批量学习 batch learning --一次性加载数据

     在线学习 online learning --增量数据

6.基于实例的学习/基于模型的学习

     1)基于实例学习

          learns the examples by heart,然后使用类似方法产生新的实例

     2)基于模型学习

         选择模型,训练模型,调参,预测

 7.机器学习目前的挑战

       1)数据少

       2)不可视

       3)数据质量低

       4)数据特征相关

           数据特征或者维度很多,但是适合模型的需要精挑细选,这里涉及两个问题,一是数据特征的选择,一是特征的组合、抽象

       5)过拟合

       6)拟合不足

 8.测试和验证

      通常可以考虑将数据分为两组,一部分用来训练,另一部分用来验证。(推崇二八原则,80%训练,20%测试)

       交叉验证:将数据分为互补的几部分,每一个模型都在不同的部分训练,在剩下的部分测试