Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.measure
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.measure
Commits
98a7442a
There was a problem fetching the pipeline summary.
Commit
98a7442a
authored
7 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
Switched to Numpy style documentation
parent
a7a9b143
No related branches found
No related tags found
1 merge request
!35
Updated CMC documentation
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/measure/__init__.py
+20
-19
20 additions, 19 deletions
bob/measure/__init__.py
with
20 additions
and
19 deletions
bob/measure/__init__.py
+
20
−
19
View file @
98a7442a
...
@@ -254,9 +254,7 @@ def recognition_rate(cmc_scores, threshold = None, rank = 1):
...
@@ -254,9 +254,7 @@ def recognition_rate(cmc_scores, threshold = None, rank = 1):
def
cmc
(
cmc_scores
):
def
cmc
(
cmc_scores
):
"""
cmc(cmc_scores) -> array
"""
Calculates the cumulative match characteristic (CMC) from the given input.
Calculates the cumulative match characteristic (CMC) from the given input.
The input has a specific format, which is a list of two-element tuples. Each
The input has a specific format, which is a list of two-element tuples. Each
of the tuples contains the negative and the positive scores for one probe
of the tuples contains the negative and the positive scores for one probe
...
@@ -273,31 +271,34 @@ def cmc(cmc_scores):
...
@@ -273,31 +271,34 @@ def cmc(cmc_scores):
.. note::
.. note::
The CMC is not available for open set classification.
Please use the
The CMC is not available for open set classification. Please use the
:py:func:`detection_identification_rate` and :py:func:`false_alarm_rate`
:py:func:`detection_identification_rate` and :py:func:`false_alarm_rate`
instead.
instead.
Parameters:
Parameters
----------
cmc_scores (:py:class:`list`): A list in the format ``[(negatives,
cmc_scores : :py:class:`list`
positives), ...]`` containing the CMC scores loaded with one of the
A list in the format ``[(negatives, positives), ...]`` containing the CMC
functions (:py:func:`bob.measure.load.cmc_four_column` or
scores loaded with one of the functions
:py:func:`bob.measure.load.cmc_five_column`).
:py:func:`bob.measure.load.cmc_four_column`,
:py:func:`bob.measure.load.cmc_five_column`, or
:py:func:`bob.measure.load.cmc`.
Each pair contains the ``negative`` and the ``positive`` scores for **one
Each pair contains the ``negative`` and the ``positive`` scores for **one
probe item**. Each pair can contain up to one empty array (or ``None``),
probe item**. Each pair can contain up to one empty array (or ``None``),
i.e., in case of open set recognition.
i.e., in case of open set recognition.
Returns:
Returns
-------
array:
A 1D float array representing the CMC curve.
The rank 1 recognition rate can be found in ``array[0]``, rank 2 rate in
``array[1]``, and so on. The number of ranks (``array.shape[0]``) is the
number of gallery items. Values are in range ``[0,1]``.
1D :py:class:`numpy.ndarray` of `float`
A 1D float array representing the CMC curve.
The rank 1 recognition rate can be found in ``array[0]``, rank 2 rate in
``array[1]``, and so on. The number of ranks (``array.shape[0]``) is the
number of gallery items. Values are in range ``[0,1]``.
"""
"""
# If no scores are given, we cannot plot anything
# If no scores are given, we cannot plot anything
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment