如何找到分类器允许的最大规模的训练集?

时间:2016-10-24 05:50:01

标签: python machine-learning scikit-learn decision-tree cross-validation

我是Python和机器学习的新手。我得到的数据集包括581012条记录和54列。我试图将数据分成80 20. 80%用于培训,20%用于测试。我使用GridSearchCV进行交叉验证并找到最佳参数。由于数据太大,我执行应用程序超过一天,但无法获得结果。我认为有什么方法可以知道分类器允许的训练集的最大大小是多少?下面是我的执行代码

parameters = {'max_depth' :range(1,21)}
print parameters 
clf = GridSearchCV(tree.DecisionTreeClassifier(), parameters, cv=10, n_jobs=-1)
clf.fit(X,y)

tree_model = clf.best_estimator_
import pickle
s = pickle.dumps(tree_model)
print(clf.best_score_, clf.best_params_)

1 个答案:

答案 0 :(得分:-1)

我认为您需要在培训之前修剪数据库。您也可以尝试WEKA工具。 http://www.cs.waikato.ac.nz/ml/weka/documentation.html