check_test.py 文件源码

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

项目:MetaHeuristic 作者: gonzalesMK 项目源码 文件源码
def test_score_grid_func():
    dataset = load_breast_cancer()
    X, y = dataset['data'], dataset['target_names'].take(dataset['target'])

    # Classifier to be used in the metaheuristic
    clf = SVC()

    for metaclass in METACLASSES:
        meta = metaclass(classifier=clf, random_state=0, verbose=True,
                        make_logbook=True, repeat=1, number_gen=3,
                        size_pop=2)

        print("Checking Grid: ", meta._name)

        # Fit the classifier
        meta.fit(X, y, normalize=True)

        # See score 
        meta.score_func_to_gridsearch(meta)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号