plotting.py 文件源码

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

项目:palladio 作者: slipguru 项目源码 文件源码
def _get_best_params(obj):
    # if obj is a ModelAssessment, then get the first GridSearch
    if isinstance(obj, ModelAssessment):
        obj = pd.DataFrame(obj.cv_results_).sort_values(
            'test_score', ascending=False).iloc[0].estimator
    elif not isinstance(obj, GridSearchCV):
        raise NotImplementedError("This can only work with a ModelAssessment "
                                  "or GridSearchCV object. You passed "
                                  "a %s object" % obj.__class__.__name__)

    return obj.best_params_
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号