This algorithm is a legacy one. The API has changed since its implementation. New versions and forks will need to be updated.
This algorithm is an analyzer. It can only be used on analysis blocks.

Algorithms have at least one input and one output. All algorithm endpoints are organized in groups. Groups are used by the platform to indicate which inputs and outputs are synchronized together. The first group is automatically synchronized with the channel defined by the block in which the algorithm is deployed.

Unnamed group

Endpoint Name Data Format Nature
scores tutorial/probe_scores/1 Input

Analyzers may produce any number of results. Once experiments using this analyzer are done, you may display the results or filter experiments using criteria based on them.

Name Type
frr float32
far float32
roc plot/scatter/1
eer float32
number_of_positives int32
threshold float32
number_of_negatives int32
xxxxxxxxxx
48
 
1
import bob
2
import bob.measure
3
import numpy
4
5
6
class Algorithm:
7
8
    def __init__(self):
9
        self.positives = []
10
        self.negatives = []
11
12
13
    def process(self, inputs, output):
14
15
        # accumulate the scores
16
        data = inputs['scores'].data
17
18
        self.positives.extend([k.score for k in data.scores if k.template_identity == data.client_identity])
19
        self.negatives.extend([k.score for k in data.scores if k.template_identity != data.client_identity])
20
21
22
        # once all values are received, evaluate the scores
23
        if not(inputs.hasMoreData()):
24
            eer_threshold = bob.measure.eer_threshold(self.negatives, self.positives)
25
            far, frr      = bob.measure.farfrr(self.negatives, self.positives, eer_threshold)
26
            roc_points    = bob.measure.roc(self.negatives, self.positives, 100)
27
28
            # writes the output back to the platform
29
            output.write({
30
                'eer': numpy.float32((far+frr) / 2.),
31
                'far': numpy.float32(far),
32
                'frr': numpy.float32(frr),
33
                'threshold': numpy.float32(eer_threshold),
34
                'number_of_positives': numpy.int32(len(self.positives)),
35
                'number_of_negatives': numpy.int32(len(self.negatives)),
36
                'roc': {
37
                    "data":
38
                        [   
39
                            {   
40
                                "label": "roc",
41
                                "x": roc_points[0],
42
                                "y": roc_points[1],
43
                            }   
44
                        ]   
45
                    },
46
            })
47
        return True
48

The code for this algorithm in Python
The ruler at 80 columns indicate suggested POSIX line breaks (for readability).
The editor will automatically enlarge to accomodate the entirety of your input
Use keyboard shortcuts for search/replace and faster editing. For example, use Ctrl-F (PC) or Cmd-F (Mac) to search through this box

Could not find any documentation for this object.

Experiments

Updated Name Databases/Protocols Analyzers
teodors/teodors/datatype_problem/1/example_aggregation_as_lists_repacking_variables atnt/3@idiap tutorial/postperf/1
AntonioCandia/AntonioCandia/eigenface_preprop/1/eigenface-with-10-components atnt/1@idiap tutorial/postperf/1
anjos/tutorial/eigenface/1/demo42 atnt/1@idiap tutorial/postperf/1
Created with Raphaël 2.1.2[compare]tutorial/postperf/1tutorial/postperf_iso/12014Jun242015May6

This table shows the number of times this algorithm has been successfully run using the given environment. Note this does not provide sufficient information to evaluate if the algorithm will run when submitted to different conditions.

Terms of Service | Contact Information | BEAT platform version 2.2.1b0 | © Idiap Research Institute - 2013-2025