scikit-learn:6. Strategies to scale computationally: bigger data

參考:http://scikit-learn.org/stable/modules/scaling_strategies.html


对于examples、features(或者两者)数量非常大的情况,挑战传统的方法要解决两个问题:内存和效率。办法是Out-of-core (or “external memory”) learning

有三种方法能够实现out-of-core。各自是:


1、Streaming instances(流体化实例):

简单说就是。instances是一个一个来的。详细实现不在scikit-learn文档范围。


2、Extracting features:

简单说就是利用different feature extraction methods(翻译之后的文章:http://blog.csdn.net/mmc2015/article/details/46992105)实现大数据提取实用数据。简化内存、提高效率。不细讲。


3、Incremental learning:

all estimators implementing the partial_fit API are candidates。

the ability to learn incrementally from a mini-batch of instances (sometimes called “online learning”) is key to out-of-core learning as it guarantees that at any given time there will be only a small amount of instances in the main memory。

全部实现 partial_fit API 的estimators都能够实现增量学习,包含:


注意:对于分类问题,因为incremental learner可能不知道全部的classes有哪些,所以第一次调用partial_fit时,最好人工设定參数 classes= ,指明全部类别。


4、Examples:

a example of Out-of-core classification of text documents. 通过样例能够更好理解上面的内容。








原文地址:https://www.cnblogs.com/slgkaifa/p/7379838.html