Did I find the right examples for you? yes no

# cogent.struct.pairs_util.all_metrics

All Samples(10)  |  Call(8)  |  Derive(0)  |  Import(2)

```from cogent.core.alphabet import CharAlphabet
from cogent.struct.rna2d import Pairs
delete_gaps_from_pairs, insert_gaps_in_pairs, gapped_to_ungapped,\
```
```    def test_all_metrics(self):
"""all_metrics: check against compare_ct.pm"""
exp = {'SENSITIVITY':0.4, 'SELECTIVITY':0.5, 'AC':0.45,\
'CC':0.42906394, 'MCC':0.42906394}
obs = all_metrics(self.true, self.predicted, seqs=self.seq, min_dist=4)
```
```        exp = {'SENSITIVITY':0.6666667, 'SELECTIVITY':0.6666667,\
'AC':0.6666667, 'CC':0.57575758, 'MCC':0.57575758}
obs = all_metrics(ref, pred, seqs=[seq], min_dist=4)
self.assertEqualItems(obs.keys(), exp.keys())
for k in exp:
```
```        pred = Pairs()
seqs = ['UACGUAGCUAGCUAGCUACG']
obs = all_metrics(ref, pred, seqs=[seqs], min_dist=4)
exp = {'SENSITIVITY':0, 'SELECTIVITY':0,\
'AC':0, 'CC':0, 'MCC':0}
```
```        pred = Pairs()
seqs = ['UACGUAGCUAGCUAGCUACG']
obs = all_metrics(ref, pred, seqs=[seqs], min_dist=4)
exp = {'SENSITIVITY':1, 'SELECTIVITY':1,\
'AC':1, 'CC':1, 'MCC':1}
```

```from cogent.core.alphabet import CharAlphabet
from cogent.struct.rna2d import Pairs
delete_gaps_from_pairs, insert_gaps_in_pairs, gapped_to_ungapped,\
```
```    def test_all_metrics(self):
"""all_metrics: check against compare_ct.pm"""
exp = {'SENSITIVITY':0.4, 'SELECTIVITY':0.5, 'AC':0.45,\
'CC':0.42906394, 'MCC':0.42906394}
obs = all_metrics(self.true, self.predicted, seqs=self.seq, min_dist=4)
```
```        exp = {'SENSITIVITY':0.6666667, 'SELECTIVITY':0.6666667,\
'AC':0.6666667, 'CC':0.57575758, 'MCC':0.57575758}
obs = all_metrics(ref, pred, seqs=[seq], min_dist=4)
self.assertEqualItems(obs.keys(), exp.keys())
for k in exp:
```
```        pred = Pairs()
seqs = ['UACGUAGCUAGCUAGCUACG']
obs = all_metrics(ref, pred, seqs=[seqs], min_dist=4)
exp = {'SENSITIVITY':0, 'SELECTIVITY':0,\
'AC':0, 'CC':0, 'MCC':0}
```
```        pred = Pairs()
seqs = ['UACGUAGCUAGCUAGCUACG']
obs = all_metrics(ref, pred, seqs=[seqs], min_dist=4)
exp = {'SENSITIVITY':1, 'SELECTIVITY':1,\
'AC':1, 'CC':1, 'MCC':1}
```