Skip to main content
 首页 » 编程设计

python之为什么带有 SVM 的 AdaBoostClassifier 效果更差

2025年05月04日35落叶无声

我说的工作更差,是指更高的训练误差。

# Boosted SVC 
clf = AdaBoostClassifier(base_estimator=SVC(random_state=1), random_state=1, algorithm="SAMME", n_estimators=5) 
clf.fit(X, y) 
 
# Only SVC 
clf = SVC() 
clf.fit(X, y) 

我的训练数据是

boosted SVM的结果:

以及SVM的结果:

请您参考如下方法:

adaBoost 的主要概念是组合弱学习器,这就是默认分类器是决策树桩的原因。因此,通过将 SVM(强分类器)用作弱分类器,您将失去集成学习的概念,并且会得到最坏的结果。