参考:http://scikit-learn.org/stable/modules/model_persistence.html
训练了模型之后,我们希望可以保存下来,遇到新样本时直接使用已经训练好的保存了的模型,而不用重新再训练模型。本节介绍pickle在保存模型方面的应用。(After
training a scikit-learn model, it is desirable ...
分类:
其他好文 时间:
2015-07-30 09:33:44
阅读次数:
211
本文K折验证拟采用的是
Python 中 sklearn 包中的 StratifiedKFold 方法。
方法思想详见:http://scikit-learn.org/stable/modules/cross_validation.html
StratifiedKFold is
a variation of k-fold which returns stratified folds:...
分类:
编程语言 时间:
2015-07-29 21:24:34
阅读次数:
817
参考:http://scikit-learn.org/stable/modules/model_evaluation.html#scoring-parameter
三种方法评估模型的预测质量:
Estimator score method: Estimators都有 score method作为默认的评估标准,不属于本节内容,具体参考不同estimators的文档。Scorin...
分类:
其他好文 时间:
2015-07-29 10:25:49
阅读次数:
195
参考:http://scikit-learn.org/stable/model_selection.html
有待翻译,敬请期待:
3.1. Cross-validation: evaluating estimator performance
3.1.1. Computing cross-validated metrics
3.1.1.1. Obtain...
分类:
其他好文 时间:
2015-07-27 23:13:01
阅读次数:
215
参考:http://scikit-learn.org/stable/modules/computational_performance.html
对于有些应用,estimators的计算效能(主要指预测新样本时的延迟和吞吐量)非常关键,我们也考虑训练的效能,但由于训练可以offline,所以我们更关注预测时的效能问题。
预测延迟(Prediction latency):预测一个新样本花...
分类:
其他好文 时间:
2015-07-27 23:11:58
阅读次数:
243
零、所有项目通用的:
http://blog.csdn.net/mmc2015/article/details/46851245(数据集格式和预测器)
http://blog.csdn.net/mmc2015/article/details/46852755(加载自己的原始数据)
(适合文本分类问题的 整个语料库加载)
http://blog.csdn.net/mmc2...
分类:
其他好文 时间:
2015-07-27 09:28:54
阅读次数:
140
参考:http://scikit-learn.org/stable/modules/preprocessing_targets.html
没什么好翻译的,直接给例子。
1、Label binarization
LabelBinarizer is
a utility class to help create a label indicator matrix from...
分类:
其他好文 时间:
2015-07-26 19:18:24
阅读次数:
216
参考:http://scikit-learn.org/stable/modules/metrics.html
The sklearn.metrics.pairwise submodule
implements utilities to evaluate pairwise distances(样本对的距离) or affinity of sets of samples(样本集的相似度)...
分类:
其他好文 时间:
2015-07-26 17:24:43
阅读次数:
167
参考:http://scikit-learn.org/stable/modules/random_projection.html
The sklearn.random_projection module
通过trading accuracy(可控的范围)来降维数据,提高效率。实现了两类unstructured random matrix:: Gaussian
random mat...
分类:
其他好文 时间:
2015-07-26 14:19:28
阅读次数:
222
参考:http://scikit-learn.org/stable/modules/unsupervised_reduction.html
对于高维features,常常需要在supervised之前unsupervised dimensionality reduction。
下面三节的翻译会在之后附上。
4.4.1. PCA: principal compo...
分类:
其他好文 时间:
2015-07-26 12:47:59
阅读次数:
149