Commit 7e80a446 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Add a command for multi protocol (N-fold cross validation) analysis

parent a55d9111
Pipeline #21359 passed with stage
in 13 minutes and 37 seconds
......@@ -84,6 +84,19 @@ def evaluate(ctx, scores, evaluation, **kwargs):
ctx, scores, evaluation, metrics, roc, det, epc, hist, **kwargs)
names='FtA, FAR, FRR, FMR, FMNR, HTER',
criteria=CRITERIA, score_format=SCORE_FORMAT,
command='bob pad multi-metrics'),
def multi_metrics(ctx, scores, evaluation, protocols_number, **kwargs):
ctx.meta['min_arg'] = protocols_number * (2 if evaluation else 1)
process = bio_figure.MultiMetrics(
ctx, scores, evaluation, load.split)
......@@ -114,7 +114,6 @@ class Dir(measure_figure.PlotBase):
class Metrics(measure_figure.Metrics):
''' Compute metrics from score files'''
def init_process(self):
if self._criterion == 'rr':
self._thres = [None] * self.n_systems if self._thres is None else \
......@@ -214,6 +213,18 @@ class Metrics(measure_figure.Metrics):
super(Metrics, self).compute(idx, input_scores, input_names)
class MultiMetrics(measure_figure.MultiMetrics):
'''Compute metrics from score files'''
def __init__(self, ctx, scores, evaluation, func_load):
super(MultiMetrics, self).__init__(
ctx, scores, evaluation, func_load,
'Failure to Acquire', 'False Match Rate',
'False Non Match Rate', 'False Accept Rate',
'False Reject Rate', 'Half Total Error Rate'))
class Hist(measure_figure.Hist):
''' Histograms for biometric scores '''
......@@ -139,6 +139,7 @@ setup(
'': [
'annotate =',
'metrics =',
'multi-metrics =',
'roc =',
'det =',
'epc =',
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment