def ada_boost_classifier_err(self, data, target, learning_rate=1, n_estimators=400, show_score=False):
ada_boost = AdaBoostClassifier(
base_estimator=self.clf,
learning_rate=learning_rate,
n_estimators=n_estimators,
algorithm="SAMME.R")
ada_boost.fit(data, target)
score = ada_boost.score(data, target)
if not show_score:
print "Fitness score: " + str(score)
return 1.0 - score
评论列表
文章目录