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
评论列表
文章目录