Пример #1
0
def get_roc_for_sequences(p_binding_site, positive_sequences, negative_sequences, pssms):
    models = [
      build_hmm_from_semi_parsed(
        parsed,
        p_binding_site=p_binding_site
      )
      for parsed
      in pssms
    ]
    roc = RocCalculator()
    update_roc(roc, generate_roc_data(models, positive_sequences, negative_sequences))
    return roc
Пример #2
0
def calculate_roc(true_binding_sites, predicted_binding_sites):
    from infpy.roc import RocCalculator, update_roc
    roc = RocCalculator()
    for predicted, truth in zip(predicted_binding_sites, true_binding_sites):
        update_roc( roc, zip(truth,predicted) )
    return roc
Пример #3
0
def binding_site_level_roc(truth, predictions, overlap_threshold=.25):
    from infpy.roc import RocCalculator, update_roc
    roc = RocCalculator()
    for t, p in zip(truth, predictions):
        update_roc(roc, assess_binding_site_overlap(t, p, overlap_threshold))
    return roc