December 2018
Intermediate to advanced
318 pages
8h 28m
English
The model is trained on the full development set. The scores are computed on the full evaluation set. Precision-recall f1-score support:
0 1.00 0.96 0.98 85296 1 0.04 0.93 0.08 147micro avg 0.96 0.96 0.96 85443 macro avg 0.52 0.94 0.53 85443 weighted avg 1.00 0.96 0.98 85443
We find the best hyperparameter optimizing for recall:
def print_gridsearch_scores(x_train_data,y_train_data): c_param_range = [0.01,0.1,1,10,100]clf = GridSearchCV(LogisticRegression(), {"C": c_param_range}, cv=5, scoring='recall') clf.fit(x_train_data,y_train_data)print "Best parameters set found on development set:"printprint clf.bestparamsprint "Grid scores on development set:" means = clf.cv_results_['mean_test_score'] stds = clf.cv_results_['std_test_score'] ...Read now
Unlock full access