Did I find the right examples for you? yes no

All Samples(6)  |  Call(2)  |  Derive(0)  |  Import(4)

src/s/e/seqlearn-HEAD/examples/conll.py   seqlearn(Download)
 
from seqlearn.datasets import load_conll
from seqlearn.evaluation import bio_f_score
from seqlearn.perceptron import StructuredPerceptron
from sklearn.metrics import accuracy_score
    y_pred = clf.predict(X_test, lengths_test)
    print("Accuracy: %.3f" % (100 * accuracy_score(y_test, y_pred)))
    print("CoNLL F1: %.3f" % (100 * bio_f_score(y_test, y_pred)))
 

src/w/e/webstruct-0.2/webstruct/metrics.py   webstruct(Download)
    It requires https://github.com/larsmans/seqlearn to work.
    """
    from seqlearn.evaluation import bio_f_score
    return sum(map(bio_f_score, y_true, y_pred)) / len(y_true)
 

src/w/e/webstruct-HEAD/webstruct/metrics.py   webstruct(Download)
    It requires https://github.com/larsmans/seqlearn to work.
    """
    from seqlearn.evaluation import bio_f_score
    return sum(map(bio_f_score, y_true, y_pred)) / len(y_true)
 

src/s/e/seqlearn-HEAD/seqlearn/tests/test_evaluation.py   seqlearn(Download)
import re
 
from seqlearn.evaluation import (bio_f_score, SequenceKFold,
                                 whole_sequence_accuracy)
 
        y_true = list(y_true)
        y_pred = list(y_pred)
        assert_equal(score, bio_f_score(y_true, y_pred))