sniffer_classifier.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:smart_sniffer 作者: ScarWar 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号