scikit-learn,classification,precision-recall

From the docs SGDClassifier has a random_state param that is initialised to None this is a seed value used for the random number generator. You need to fix this value so the results are repeatable so set random_state=0 or whatever favourite number you want clf = SGDClassifier(loss="log", penalty="elasticnet",n_iter=70, random_state=0) should...

machine-learning,precision,recall,precision-recall

First of all, what you have written is not the F1-score. That is Precision! To compute the F1-score, set precision=TP/(TP+FP) and recall=TP/(TP+FN). Their harmonic mean is the F1-score. So, F1=2*(P*R)/(P+R). See this for further details. You can compute these values for each class and see how well you are doing...

scikit-learn,classification,cross-validation,precision-recall

You can consider using all the method in sklearn.metrics package. I think this method could do the work you expect. It gives you a 2D array with one row for each target unique value and columns for precision, recall, fscore and support. For fast logging you can use classification_report too....

machine-learning,vowpalwabbit,precision-recall

Given that you have a pair of 'predicted vs actual' value for each example, you can use Rich Caruana's KDD perf utility to compute these (and many other) metrics. In the case of multi-class, you should simply consider every correctly classified case a success and every class-mismatch a failure to...

matlab,plot,bar-chart,legend,precision-recall

Try this: legend('indiscernible relation','cernible relation' ,'equivalence relation') Colors will be automatically inserted to the legend...