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

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.
No experiments are using this algorithm.
Created with Raphaël 2.1.2[compare]elie_khoury/postperf/1elie_khoury/postperf/2Aug272014Sep6

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