model_selection.py 文件源码

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

项目:StrepHit 作者: Wikidata 项目源码 文件源码
def get_models(test):
    return [
        (LinearSVC, {
            'C': [0.01, 0.1, 1.0, 10.0],
            'multi_class': ['ovr', 'crammer_singer'],
        }),
    ] + ([
        (KNeighborsClassifier, {
            'weights': ['uniform', 'distance'],
        }),
        (SVC, {
            'C': [0.01, 0.1, 1.0, 10.0, 100.0],
            'kernel': ['linear', 'poly', 'rbf', 'sigmoid'],
            'decision_function_shape': ['ovr', 'ovo'],
        }),
        (RandomForestClassifier, {
            'criterion': ['gini', 'entropy'],
            'min_samples_split': [5, 10, 25],
            'min_samples_leaf': [5, 10, 25],
            'n_estimators': [5, 10, 50, 100],
        })
    ] if not test else [])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号