Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

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)
 
def test_accuracy():
    y_true = ["0111001", "1001", "00011111", "010101011", "1110"]
    y_pred = ["0010010", "1001", "00011110", "010101011", "1110"]
    assert_equal(.6, whole_sequence_accuracy(''.join(y_true), ''.join(y_pred),
                                             [len(y) for y in y_true]))