【发布时间】:2015-01-18 06:30:30
【问题描述】:
我正在做一个文本分类的任务(7000 个文本由 10 个标签均匀分布)。并通过探索 SVM 和 Logistic 回归
clf1 = svm.LinearSVC()
clf1.fit(X, y)
clf1.predict(X_test)
score1 = clf1.score(X_test,y_true)
clf2 = linear_model.LogisticRegression()
clf2.fit(X, y)
clf2.predict(X_test)
score2 = clf2.score(X_test,y_true)
我得到了两个准确度,score1 和score2 我想我是否可以通过开发一个结合上述两个分类器输出的集成系统来提高我的准确度。
我自己学习了ensemble 的知识,我知道有bagging,boosting,and stacking。
但是,我不知道如何在ensemble 中使用我的支持向量机和逻辑回归预测的分数。谁能给我一些想法或给我一些示例代码?
【问题讨论】:
标签: python svm logistic-regression text-classification ensemble-learning