a2.py 文件源码

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

项目:assignments 作者: iit-cs579 项目源码 文件源码
def fit_best_classifier(docs, labels, best_result):
    """
    Using the best setting from eval_all_combinations,
    re-vectorize all the training data and fit a
    LogisticRegression classifier to all training data.
    (i.e., no cross-validation done here)

    Params:
      docs..........List of training document strings.
      labels........The true labels for each training document (0 or 1)
      best_result...Element of eval_all_combinations
                    with highest accuracy
    Returns:
      clf.....A LogisticRegression classifier fit to all
            training data.
      vocab...The dict from feature name to column index.
    """
    ###TODO
    pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号