diff --git a/.buildinfo b/.buildinfo index 0c2c980..683768d 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 7544be936d9c497822b4fc681e29ae8d +config: 0a12e1885e9e5b2b3a2938f45fb8dc27 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.doctrees/api/audmetric.concordance_cc.doctree b/.doctrees/api/audmetric.concordance_cc.doctree index c91d24c..a89f32e 100644 Binary files a/.doctrees/api/audmetric.concordance_cc.doctree and b/.doctrees/api/audmetric.concordance_cc.doctree differ diff --git a/.doctrees/api/audmetric.detection_error_tradeoff.doctree b/.doctrees/api/audmetric.detection_error_tradeoff.doctree index 37c450c..16ce159 100644 Binary files a/.doctrees/api/audmetric.detection_error_tradeoff.doctree and b/.doctrees/api/audmetric.detection_error_tradeoff.doctree differ diff --git a/.doctrees/api/audmetric.edit_distance.doctree b/.doctrees/api/audmetric.edit_distance.doctree index 61a35d8..eb8545e 100644 Binary files a/.doctrees/api/audmetric.edit_distance.doctree and b/.doctrees/api/audmetric.edit_distance.doctree differ diff --git a/.doctrees/api/audmetric.equal_error_rate.doctree b/.doctrees/api/audmetric.equal_error_rate.doctree index b506485..f49f0ee 100644 Binary files a/.doctrees/api/audmetric.equal_error_rate.doctree and b/.doctrees/api/audmetric.equal_error_rate.doctree differ diff --git a/.doctrees/api/audmetric.event_error_rate.doctree b/.doctrees/api/audmetric.event_error_rate.doctree index 0c3128a..3f896aa 100644 Binary files a/.doctrees/api/audmetric.event_error_rate.doctree and b/.doctrees/api/audmetric.event_error_rate.doctree differ diff --git a/.doctrees/api/audmetric.linkability.doctree b/.doctrees/api/audmetric.linkability.doctree index 9d61c90..aec2408 100644 Binary files a/.doctrees/api/audmetric.linkability.doctree and b/.doctrees/api/audmetric.linkability.doctree differ diff --git a/.doctrees/api/audmetric.unweighted_average_bias.doctree b/.doctrees/api/audmetric.unweighted_average_bias.doctree index a268d48..96099ac 100644 Binary files a/.doctrees/api/audmetric.unweighted_average_bias.doctree and b/.doctrees/api/audmetric.unweighted_average_bias.doctree differ diff --git a/.doctrees/api/audmetric.weighted_confusion_error.doctree b/.doctrees/api/audmetric.weighted_confusion_error.doctree index 882e9c4..7615b1d 100644 Binary files a/.doctrees/api/audmetric.weighted_confusion_error.doctree and b/.doctrees/api/audmetric.weighted_confusion_error.doctree differ diff --git a/.doctrees/api/audmetric.word_error_rate.doctree b/.doctrees/api/audmetric.word_error_rate.doctree index b2018a9..430817f 100644 Binary files a/.doctrees/api/audmetric.word_error_rate.doctree and b/.doctrees/api/audmetric.word_error_rate.doctree differ diff --git a/.doctrees/changelog.doctree b/.doctrees/changelog.doctree index 735576b..9244264 100644 Binary files a/.doctrees/changelog.doctree and b/.doctrees/changelog.doctree differ diff --git a/.doctrees/contributing.doctree b/.doctrees/contributing.doctree index fe09b03..38506a8 100644 Binary files a/.doctrees/contributing.doctree and b/.doctrees/contributing.doctree differ diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index 0c54235..4bf12de 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/.doctrees/index.doctree b/.doctrees/index.doctree index de9b6cb..e3595de 100644 Binary files a/.doctrees/index.doctree and b/.doctrees/index.doctree differ diff --git a/_modules/audmetric/core/api.html b/_modules/audmetric/core/api.html index cb6ddd5..f58cc4f 100644 --- a/_modules/audmetric/core/api.html +++ b/_modules/audmetric/core/api.html @@ -29,7 +29,7 @@ - + @@ -65,7 +65,7 @@
import collections
-import operator
import typing
import warnings
@@ -149,17 +148,15 @@ Source code for audmetric.core.api
import audeer
-from audmetric.core.utils import (
- assert_equal_length,
- infer_labels,
- scores_per_subgroup_and_class,
-)
+from audmetric.core.utils import assert_equal_length
+from audmetric.core.utils import infer_labels
+from audmetric.core.utils import scores_per_subgroup_and_class
[docs]def accuracy(
- truth: typing.Sequence[typing.Any],
- prediction: typing.Sequence[typing.Any],
- labels: typing.Sequence[typing.Union[str, int]] = None
+ truth: typing.Sequence[typing.Any],
+ prediction: typing.Sequence[typing.Any],
+ labels: typing.Sequence[typing.Union[str, int]] = None,
) -> float:
r"""Classification accuracy.
@@ -199,10 +196,7 @@ Source code for audmetric.core.api
# keep where both prediction and truth contained in `labels`
label_mask = np.nonzero(
- np.logical_or(
- np.isin(truth, labels),
- np.isin(prediction, labels)
- )
+ np.logical_or(np.isin(truth, labels), np.isin(prediction, labels))
)
truth = truth[label_mask]
prediction = prediction[label_mask]
@@ -214,8 +208,10 @@ Source code for audmetric.core.api
[docs]def concordance_cc(
- truth: typing.Sequence[float],
- prediction: typing.Sequence[float],
+ truth: typing.Sequence[float],
+ prediction: typing.Sequence[float],
+ *,
+ ignore_nan: bool = False,
) -> float:
r"""Concordance correlation coefficient.
@@ -234,6 +230,10 @@ Source code for audmetric.core.api
Args:
truth: ground truth values
prediction: predicted values
+ ignore_nan: if ``True``
+ all samples that contain ``NaN``
+ in ``truth`` or ``prediction``
+ are ignored
Returns:
concordance correlation coefficient :math:`\in [-1, 1]`
@@ -243,7 +243,7 @@ Source code for audmetric.core.api
Examples:
>>> concordance_cc([0, 1, 2], [0, 1, 1])
- 0.6666666666666666
+ 0.6666666666666665
"""
assert_equal_length(truth, prediction)
@@ -253,33 +253,37 @@ Source code for audmetric.core.api
if not isinstance(prediction, np.ndarray):
prediction = np.array(list(prediction))
+ if ignore_nan:
+ mask = ~(np.isnan(truth) | np.isnan(prediction))
+ truth = truth[mask]
+ prediction = prediction[mask]
+
if len(prediction) < 2:
return np.NaN
- r = pearson_cc(prediction, truth)
- x_mean = prediction.mean()
- y_mean = truth.mean()
- x_std = prediction.std()
- y_std = truth.std()
- denominator = (
- x_std * x_std
- + y_std * y_std
- + (x_mean - y_mean) * (x_mean - y_mean)
- )
+ length = prediction.size
+ mean_y = np.mean(truth)
+ mean_x = np.mean(prediction)
+ a = prediction - mean_x
+ b = truth - mean_y
+
+ numerator = 2 * np.dot(a, b)
+ denominator = np.dot(a, a) + np.dot(b, b) + length * (mean_x - mean_y) ** 2
+
if denominator == 0:
ccc = np.nan
else:
- ccc = 2 * r * x_std * y_std / denominator
+ ccc = numerator / denominator
return float(ccc)
[docs]def confusion_matrix(
- truth: typing.Sequence[typing.Any],
- prediction: typing.Sequence[typing.Any],
- labels: typing.Sequence[typing.Any] = None,
- *,
- normalize: bool = False,
+ truth: typing.Sequence[typing.Any],
+ prediction: typing.Sequence[typing.Any],
+ labels: typing.Sequence[typing.Any] = None,
+ *,
+ normalize: bool = False,
) -> typing.List[typing.List[typing.Union[int, float]]]:
r"""Confusion matrix.
@@ -332,14 +336,8 @@ Source code for audmetric.core.api
[docs]def detection_error_tradeoff(
- truth: typing.Union[
- typing.Union[bool, int],
- typing.Sequence[typing.Union[bool, int]]
- ],
- prediction: typing.Union[
- typing.Union[bool, int, float],
- typing.Sequence[typing.Union[bool, int, float]]
- ],
+ truth: typing.Sequence[typing.Union[bool, int]],
+ prediction: typing.Sequence[typing.Union[bool, int, float]],
) -> typing.Tuple[np.ndarray, np.ndarray, np.ndarray]:
r"""Detection error tradeoff for verification experiments.
@@ -362,8 +360,8 @@ Source code for audmetric.core.api
whereas prediction values
can also contain similarity scores, e.g. ``[0.8, 0.1, ...]``.
- The implementation is identical with the one provided
- by the pyeer_ package.
+ The implementation was inspired by pyeer.eer_stats.calculate_roc but has
+ been accelerated by using numpy-arrays instead of lists.
.. _detection error tradeoff (DET): https://en.wikipedia.org/wiki/Detection_error_tradeoff
.. _pyeer: https://github.com/manuelaguadomtz/pyeer
@@ -398,11 +396,13 @@ Source code for audmetric.core.api
iscores_number = len(iscores)
# Labeling genuine scores as 1 and impostor scores as 0
- gscores = list(zip(gscores, [1] * gscores_number))
- iscores = list(zip(iscores, [0] * iscores_number))
+ gscores = np.column_stack((gscores, np.ones(gscores_number, dtype=int)))
+ iscores = np.column_stack((iscores, np.zeros(iscores_number, dtype=int)))
# Stacking scores
- scores = np.array(sorted(gscores + iscores, key=operator.itemgetter(0)))
+ all_scores = np.concatenate([gscores, iscores])
+ sorted_indices = np.argsort(all_scores[:, 0])
+ scores = all_scores[sorted_indices]
cumul = np.cumsum(scores[:, 1])
# Grouping scores
@@ -421,7 +421,7 @@ Source code for audmetric.core.api
[docs]def edit_distance(
truth: typing.Union[str, typing.Sequence[int]],
- prediction: typing.Union[str, typing.Sequence[int]]
+ prediction: typing.Union[str, typing.Sequence[int]],
) -> int:
r"""Edit distance between two sequences of chars or ints.
@@ -438,8 +438,8 @@ Source code for audmetric.core.api
edit distance
Examples:
- >>> truth = 'lorem'
- >>> prediction = 'lorm'
+ >>> truth = "lorem"
+ >>> prediction = "lorm"
>>> edit_distance(truth, prediction)
1
>>> truth = [0, 1, 2]
@@ -467,9 +467,11 @@ Source code for audmetric.core.api
m1[0] = i + 1
for j in range(len(truth)):
cost = 0 if prediction[i] == truth[j] else 1
- m1[j + 1] = min(m1[j] + 1, # deletion
- m0[j + 1] + 1, # insertion
- m0[j] + cost) # substitution
+ m1[j + 1] = min(
+ m1[j] + 1, # deletion
+ m0[j + 1] + 1, # insertion
+ m0[j] + cost,
+ ) # substitution
for j in range(len(m0)):
m0[j] = m1[j]
@@ -478,14 +480,8 @@ Source code for audmetric.core.api
[docs]def equal_error_rate(
- truth: typing.Union[
- typing.Union[bool, int],
- typing.Sequence[typing.Union[bool, int]]
- ],
- prediction: typing.Union[
- typing.Union[bool, int, float],
- typing.Sequence[typing.Union[bool, int, float]]
- ],
+ truth: typing.Sequence[typing.Union[bool, int]],
+ prediction: typing.Sequence[typing.Union[bool, int, float]],
) -> typing.Tuple[float, collections.namedtuple]:
r"""Equal error rate for verification tasks.
@@ -552,12 +548,12 @@ Source code for audmetric.core.api
"""
Stats = collections.namedtuple(
- 'stats',
+ "stats",
[
- 'fmr', # False match rates (FMR)
- 'fnmr', # False non-match rates (FNMR)
- 'thresholds', # Thresholds
- 'threshold', # verification threshold for EER
+ "fmr", # False match rates (FMR)
+ "fnmr", # False non-match rates (FNMR)
+ "thresholds", # Thresholds
+ "threshold", # verification threshold for EER
],
)
fmr, fnmr, thresholds = detection_error_tradeoff(truth, prediction)
@@ -568,9 +564,9 @@ Source code for audmetric.core.api
t2 = t2[0]
else:
warnings.warn(
- 'The false match rate '
- 'and false non-match rate curves '
- 'do not intersect each other.',
+ "The false match rate "
+ "and false non-match rate curves "
+ "do not intersect each other.",
RuntimeWarning,
)
eer = 1.0
@@ -590,9 +586,7 @@ Source code for audmetric.core.api
[docs]def event_error_rate(
- truth: typing.Union[
- str, typing.Sequence[typing.Union[str, typing.Sequence[int]]]
- ],
+ truth: typing.Union[str, typing.Sequence[typing.Union[str, typing.Sequence[int]]]],
prediction: typing.Union[
str, typing.Sequence[typing.Union[str, typing.Sequence[int]]]
],
@@ -623,9 +617,9 @@ Source code for audmetric.core.api
0.5
>>> event_error_rate([[0, 1], [2]], [[0], [2]])
0.25
- >>> event_error_rate(['lorem'], ['lorm'])
+ >>> event_error_rate(["lorem"], ["lorm"])
0.2
- >>> event_error_rate(['lorem', 'ipsum'], ['lorm', 'ipsum'])
+ >>> event_error_rate(["lorem", "ipsum"], ["lorm", "ipsum"])
0.1
"""
@@ -634,7 +628,7 @@ Source code for audmetric.core.api
assert_equal_length(truth, prediction)
- eer = 0.
+ eer = 0.0
for t, p in zip(truth, prediction):
n = max(len(t), len(p))
@@ -646,11 +640,11 @@ Source code for audmetric.core.api
[docs]def fscore_per_class(
- truth: typing.Sequence[typing.Any],
- prediction: typing.Sequence[typing.Any],
- labels: typing.Sequence[typing.Any] = None,
- *,
- zero_division: float = 0,
+ truth: typing.Sequence[typing.Any],
+ prediction: typing.Sequence[typing.Any],
+ labels: typing.Sequence[typing.Any] = None,
+ *,
+ zero_division: float = 0,
) -> typing.Dict[str, float]:
r"""F-score per class.
@@ -705,16 +699,14 @@ Source code for audmetric.core.api
[docs]def linkability(
- truth: typing.Union[
- typing.Union[bool, int],
- typing.Sequence[typing.Union[bool, int]]
- ],
- prediction: typing.Union[
- typing.Union[bool, int, float],
- typing.Sequence[typing.Union[bool, int, float]]
- ],
- omega: float = 1.0,
- nbins: int = None,
+ truth: typing.Union[
+ typing.Union[bool, int], typing.Sequence[typing.Union[bool, int]]
+ ],
+ prediction: typing.Union[
+ typing.Union[bool, int, float], typing.Sequence[typing.Union[bool, int, float]]
+ ],
+ omega: float = 1.0,
+ nbins: int = None,
) -> float:
r"""Linkability for verification tasks.
@@ -767,14 +759,12 @@ Source code for audmetric.core.api
>>> truth = [1, 0] * int(samples / 2)
>>> prediction = []
>>> for _ in range(int(samples / 2)):
- ... prediction.extend(
- ... [np.random.uniform(0, 0.2), np.random.uniform(0.8, 1.0)]
- ... )
+ ... prediction.extend([np.random.uniform(0, 0.2), np.random.uniform(0.8, 1.0)])
>>> linkability(truth, prediction)
0.9747999999999999
>>> truth = [1, 0, 0, 0] * int(samples / 4)
>>> prediction = [np.random.uniform(0, 1) for _ in range(samples)]
- >>> linkability(truth, prediction, omega=1/3)
+ >>> linkability(truth, prediction, omega=1 / 3)
0.0
""" # noqa: E501
@@ -798,25 +788,22 @@ Source code for audmetric.core.api
y1 = np.histogram(mated_scores, bins=bin_edges, density=True)[0]
y2 = np.histogram(non_mated_scores, bins=bin_edges, density=True)[0]
# LR = P[s|mated ]/P[s|non-mated]
- LR = np.divide(y1, y2, out=np.ones_like(y1), where=y2 != 0)
- D = 2 * (omega * LR / (1 + omega*LR)) - 1
+ lr = np.divide(y1, y2, out=np.ones_like(y1), where=y2 != 0)
+ d = 2 * (omega * lr / (1 + omega * lr)) - 1
# Def of D
- D[omega * LR <= 1] = 0
+ d[omega * lr <= 1] = 0
# Taking care of inf/NaN
- mask = [
- True if y2[i] == 0 and y1[i] != 0 else False
- for i in range(len(y1))
- ]
- D[mask] = 1
+ mask = [True if y2[i] == 0 and y1[i] != 0 else False for i in range(len(y1))]
+ d[mask] = 1
# Global measure using trapz numerical integration
- Dsys = np.trapz(x=bin_centers, y=D * y1)
+ d_sys = np.trapz(x=bin_centers, y=d * y1)
- return Dsys
+ return d_sys
[docs]def mean_absolute_error(
- truth: typing.Sequence[float],
- prediction: typing.Sequence[float],
+ truth: typing.Sequence[float],
+ prediction: typing.Sequence[float],
) -> float:
r"""Mean absolute error.
@@ -849,8 +836,8 @@ Source code for audmetric.core.api
[docs]def mean_squared_error(
- truth: typing.Sequence[float],
- prediction: typing.Sequence[float],
+ truth: typing.Sequence[float],
+ prediction: typing.Sequence[float],
) -> float:
r"""Mean squared error.
@@ -883,8 +870,8 @@ Source code for audmetric.core.api
[docs]def pearson_cc(
- truth: typing.Sequence[float],
- prediction: typing.Sequence[float],
+ truth: typing.Sequence[float],
+ prediction: typing.Sequence[float],
) -> float:
r"""Pearson correlation coefficient.
@@ -925,11 +912,11 @@ Source code for audmetric.core.api
[docs]def precision_per_class(
- truth: typing.Sequence[typing.Any],
- prediction: typing.Sequence[typing.Any],
- labels: typing.Sequence[typing.Any] = None,
- *,
- zero_division: float = 0,
+ truth: typing.Sequence[typing.Any],
+ prediction: typing.Sequence[typing.Any],
+ labels: typing.Sequence[typing.Any] = None,
+ *,
+ zero_division: float = 0,
) -> typing.Dict[str, float]:
r"""Precision per class.
@@ -961,7 +948,7 @@ Source code for audmetric.core.api
matrix = np.array(confusion_matrix(truth, prediction, labels))
total = matrix.sum(axis=0)
- old_settings = np.seterr(invalid='ignore')
+ old_settings = np.seterr(invalid="ignore")
recall = matrix.diagonal() / total
np.seterr(**old_settings)
recall[np.isnan(recall)] = zero_division
@@ -970,11 +957,11 @@ Source code for audmetric.core.api
[docs]def recall_per_class(
- truth: typing.Sequence[typing.Any],
- prediction: typing.Sequence[typing.Any],
- labels: typing.Sequence[typing.Any] = None,
- *,
- zero_division: float = 0,
+ truth: typing.Sequence[typing.Any],
+ prediction: typing.Sequence[typing.Any],
+ labels: typing.Sequence[typing.Any] = None,
+ *,
+ zero_division: float = 0,
) -> typing.Dict[str, float]:
r"""Recall per class.
@@ -1006,7 +993,7 @@ Source code for audmetric.core.api
matrix = np.array(confusion_matrix(truth, prediction, labels))
total = matrix.sum(axis=1)
- old_settings = np.seterr(invalid='ignore')
+ old_settings = np.seterr(invalid="ignore")
recall = matrix.diagonal() / total
np.seterr(**old_settings)
recall[np.isnan(recall)] = zero_division
@@ -1015,26 +1002,26 @@ Source code for audmetric.core.api
[docs]def unweighted_average_bias(
- truth: typing.Sequence[typing.Any],
- prediction: typing.Sequence[typing.Any],
- protected_variable: typing.Sequence[typing.Any],
- labels: typing.Sequence[typing.Any] = None,
- *,
- subgroups: typing.Sequence[typing.Any] = None,
- metric: typing.Callable[
- [
- typing.Sequence[typing.Any],
- typing.Sequence[typing.Any],
- typing.Optional[typing.Sequence[str]],
- ],
- typing.Dict[str, float]
- ] = fscore_per_class,
- reduction: typing.Callable[
- [
- typing.Sequence[float],
- ],
- float,
- ] = np.std,
+ truth: typing.Sequence[typing.Any],
+ prediction: typing.Sequence[typing.Any],
+ protected_variable: typing.Sequence[typing.Any],
+ labels: typing.Sequence[typing.Any] = None,
+ *,
+ subgroups: typing.Sequence[typing.Any] = None,
+ metric: typing.Callable[
+ [
+ typing.Sequence[typing.Any],
+ typing.Sequence[typing.Any],
+ typing.Optional[typing.Sequence[str]],
+ ],
+ typing.Dict[str, float],
+ ] = fscore_per_class,
+ reduction: typing.Callable[
+ [
+ typing.Sequence[float],
+ ],
+ float,
+ ] = np.std,
) -> float:
r"""Unweighted average bias of protected variable.
@@ -1091,26 +1078,27 @@ Source code for audmetric.core.api
``protected_variable``
Examples:
- >>> unweighted_average_bias([1, 1], [1, 0], ['male', 'female'])
+ >>> unweighted_average_bias([1, 1], [1, 0], ["male", "female"])
0.5
>>> unweighted_average_bias(
- ... [1, 1], [1, 0], ['male', 'female'],
- ... subgroups=['female', 'male'],
+ ... [1, 1],
+ ... [1, 0],
+ ... ["male", "female"],
+ ... subgroups=["female", "male"],
... reduction=lambda x: x[0] - x[1],
... )
-1.0
- >>> unweighted_average_bias(
- ... [0, 1], [1, 0], ['male', 'female'],
- ... metric=recall_per_class
- ... )
+ >>> unweighted_average_bias([0, 1], [1, 0], ["male", "female"], metric=recall_per_class)
nan
>>> unweighted_average_bias(
- ... [0, 0, 0, 0], [1, 1, 0, 0], ['a', 'b', 'c', 'd'],
+ ... [0, 0, 0, 0],
+ ... [1, 1, 0, 0],
+ ... ["a", "b", "c", "d"],
... metric=recall_per_class,
... )
0.5
- """
+ """ # noqa: E501
if labels is None:
labels = infer_labels(truth, prediction)
@@ -1134,14 +1122,14 @@ Source code for audmetric.core.api
zero_division=np.nan,
)
- bias = 0.
+ bias = 0.0
denominator = 0
for label in labels:
scores_subgroup = [
- scores[subgroup][label] for subgroup in subgroups
- if label in scores[subgroup]
- and not np.isnan(scores[subgroup][label])
+ scores[subgroup][label]
+ for subgroup in subgroups
+ if label in scores[subgroup] and not np.isnan(scores[subgroup][label])
]
# compute score divergence only where more than 1 score per class
if len(scores_subgroup) > 1:
@@ -1155,11 +1143,11 @@ Source code for audmetric.core.api
[docs]def unweighted_average_fscore(
- truth: typing.Sequence[typing.Any],
- prediction: typing.Sequence[typing.Any],
- labels: typing.Sequence[typing.Any] = None,
- *,
- zero_division: float = 0,
+ truth: typing.Sequence[typing.Any],
+ prediction: typing.Sequence[typing.Any],
+ labels: typing.Sequence[typing.Any] = None,
+ *,
+ zero_division: float = 0,
) -> float:
r"""Unweighted average F-score.
@@ -1199,11 +1187,11 @@ Source code for audmetric.core.api
[docs]def unweighted_average_precision(
- truth: typing.Sequence[typing.Any],
- prediction: typing.Sequence[typing.Any],
- labels: typing.Sequence[typing.Any] = None,
- *,
- zero_division: float = 0,
+ truth: typing.Sequence[typing.Any],
+ prediction: typing.Sequence[typing.Any],
+ labels: typing.Sequence[typing.Any] = None,
+ *,
+ zero_division: float = 0,
) -> float:
r"""Unweighted average precision.
@@ -1242,11 +1230,11 @@ Source code for audmetric.core.api
[docs]def unweighted_average_recall(
- truth: typing.Sequence[typing.Any],
- prediction: typing.Sequence[typing.Any],
- labels: typing.Sequence[typing.Any] = None,
- *,
- zero_division: float = 0,
+ truth: typing.Sequence[typing.Any],
+ prediction: typing.Sequence[typing.Any],
+ labels: typing.Sequence[typing.Any] = None,
+ *,
+ zero_division: float = 0,
) -> float:
r"""Unweighted average recall.
@@ -1316,11 +1304,10 @@ Source code for audmetric.core.api
weighted confusion error
Examples:
-
>>> truth = [0, 1, 2]
>>> prediction = [0, 2, 0]
>>> # penalize only errors > 1
- >>> weights = [[0, 0 , 1], [0, 0, 0], [1, 0, 0]]
+ >>> weights = [[0, 0, 1], [0, 0, 0], [1, 0, 0]]
>>> weighted_confusion_error(truth, prediction, weights)
0.5
@@ -1331,10 +1318,10 @@ Source code for audmetric.core.api
if not cm.shape == weights.shape:
raise ValueError(
- 'Shape of weights '
- f'{weights.shape} '
- 'does not match shape of confusion matrix '
- f'{cm.shape}.'
+ "Shape of weights "
+ f"{weights.shape} "
+ "does not match shape of confusion matrix "
+ f"{cm.shape}."
)
weighted_cm = cm * weights
@@ -1343,7 +1330,7 @@ Source code for audmetric.core.api
[docs]def word_error_rate(
truth: typing.Sequence[typing.Sequence[str]],
- prediction: typing.Sequence[typing.Sequence[str]]
+ prediction: typing.Sequence[typing.Sequence[str]],
) -> float:
r"""Word error rate based on edit distance.
@@ -1358,15 +1345,15 @@ Source code for audmetric.core.api
ValueError: if ``truth`` and ``prediction`` differ in length
Examples:
- >>> truth = [['lorem', 'ipsum'], ['north', 'wind', 'and', 'sun']]
- >>> prediction = [['lorm', 'ipsum'], ['north', 'wind']]
+ >>> truth = [["lorem", "ipsum"], ["north", "wind", "and", "sun"]]
+ >>> prediction = [["lorm", "ipsum"], ["north", "wind"]]
>>> word_error_rate(truth, prediction)
0.5
"""
assert_equal_length(truth, prediction)
- wer = 0.
+ wer = 0.0
for t, p in zip(truth, prediction):
# map words to ints
@@ -1385,18 +1372,16 @@ Source code for audmetric.core.api
def _matching_scores(
truth: typing.Union[
- typing.Union[bool, int],
- typing.Sequence[typing.Union[bool, int]]
+ typing.Union[bool, int], typing.Sequence[typing.Union[bool, int]]
],
prediction: typing.Union[
- typing.Union[bool, int, float],
- typing.Sequence[typing.Union[bool, int, float]]
+ typing.Union[bool, int, float], typing.Sequence[typing.Union[bool, int, float]]
],
) -> typing.Tuple[np.ndarray, np.ndarray]:
r"""Mated and non-mated scores for verification tasks.
For verification task,
- predictions are usually seperated
+ predictions are usually separated
in all predictions belonging
to the matching examples,
and all other predictions.
@@ -1472,7 +1457,7 @@ Source code for audmetric.core.api
- Built with Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -1480,7 +1465,7 @@ Source code for audmetric.core.api
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/_modules/audmetric/core/utils.html b/_modules/audmetric/core/utils.html
index b6212ac..44136b7 100644
--- a/_modules/audmetric/core/utils.html
+++ b/_modules/audmetric/core/utils.html
@@ -29,7 +29,7 @@
-
+
@@ -65,7 +65,7 @@
- v1.2.0
+ v1.2.1
@@ -146,20 +146,20 @@ Source code for audmetric.core.utils
def assert_equal_length(
- truth: typing.Sequence[typing.Any],
- prediction: typing.Sequence[typing.Any],
+ truth: typing.Sequence[typing.Any],
+ prediction: typing.Sequence[typing.Any],
):
r"""Assert truth and prediction have equal length."""
if len(truth) != len(prediction):
raise ValueError(
- f'Truth and prediction differ in length: '
- f'{len(truth)} != {len(prediction)}.'
+ f"Truth and prediction differ in length: "
+ f"{len(truth)} != {len(prediction)}."
)
[docs]def infer_labels(
- truth: typing.Sequence[typing.Any],
- prediction: typing.Sequence[typing.Any],
+ truth: typing.Sequence[typing.Any],
+ prediction: typing.Sequence[typing.Any],
) -> typing.List[typing.Any]:
r"""Infer labels from truth and prediction.
@@ -178,21 +178,21 @@ Source code for audmetric.core.utils
def scores_per_subgroup_and_class(
- truth: typing.Sequence[typing.Any],
- prediction: typing.Sequence[typing.Any],
- protected_variable: typing.Sequence[typing.Any],
- metric: typing.Callable[
- [
- typing.Sequence[typing.Any],
- typing.Sequence[typing.Any],
- typing.Optional[typing.Sequence[str]],
- float
- ],
- typing.Dict[str, float],
+ truth: typing.Sequence[typing.Any],
+ prediction: typing.Sequence[typing.Any],
+ protected_variable: typing.Sequence[typing.Any],
+ metric: typing.Callable[
+ [
+ typing.Sequence[typing.Any],
+ typing.Sequence[typing.Any],
+ typing.Optional[typing.Sequence[str]],
+ float,
],
- labels: typing.Sequence[typing.Any],
- subgroups: typing.Sequence[typing.Any],
- zero_division: float,
+ typing.Dict[str, float],
+ ],
+ labels: typing.Sequence[typing.Any],
+ subgroups: typing.Sequence[typing.Any],
+ zero_division: float,
) -> typing.Dict[typing.Hashable, typing.Dict]:
r"""Compute scores per class for each subgroup based on metric.
@@ -216,20 +216,32 @@ Source code for audmetric.core.utils
Examples:
>>> import audmetric
>>> scores_per_subgroup_and_class(
- ... [1, 1], [0, 1], ['male', 'female'], audmetric.recall_per_class,
- ... [0, 1], ['male', 'female'], 0.)
+ ... [1, 1],
+ ... [0, 1],
+ ... ["male", "female"],
+ ... audmetric.recall_per_class,
+ ... [0, 1],
+ ... ["male", "female"],
+ ... 0.0,
+ ... )
{'male': {0: 0.0, 1: 0.0}, 'female': {0: 0.0, 1: 1.0}}
>>> scores_per_subgroup_and_class(
- ... [1, 1], [0, 1], ['male', 'female'], audmetric.precision_per_class,
- ... [0, 1], ['male', 'female'], zero_division=np.nan)
+ ... [1, 1],
+ ... [0, 1],
+ ... ["male", "female"],
+ ... audmetric.precision_per_class,
+ ... [0, 1],
+ ... ["male", "female"],
+ ... zero_division=np.nan,
+ ... )
{'male': {0: 0.0, 1: nan}, 'female': {0: nan, 1: 1.0}}
""" # noqa: E501
if set(subgroups) - set(protected_variable):
raise ValueError(
- f'`subgroups` contains manifestations of the protected '
- f'variable which are not contained in `protected_variable`: '
- f'{set(subgroups) - set(protected_variable)}'
+ f"`subgroups` contains manifestations of the protected "
+ f"variable which are not contained in `protected_variable`: "
+ f"{set(subgroups) - set(protected_variable)}"
)
truth = np.array(truth)
@@ -261,7 +273,7 @@ Source code for audmetric.core.utils
- Built with Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -269,7 +281,7 @@ Source code for audmetric.core.utils
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/_modules/index.html b/_modules/index.html
index dde6d07..35174ac 100644
--- a/_modules/index.html
+++ b/_modules/index.html
@@ -29,7 +29,7 @@
-
+
@@ -65,7 +65,7 @@
- v1.2.0
+ v1.2.1
@@ -156,7 +156,7 @@ All modules for which code is available
- Built with Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -164,7 +164,7 @@ All modules for which code is available
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt
index ce0d0d3..dbe4802 100644
--- a/_sources/index.rst.txt
+++ b/_sources/index.rst.txt
@@ -1,5 +1,3 @@
-.. documentation master file
-
.. include:: ../README.rst
.. toctree::
diff --git a/_static/pygments.css b/_static/pygments.css
index 7a18115..8054382 100644
--- a/_static/pygments.css
+++ b/_static/pygments.css
@@ -17,6 +17,7 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
.highlight .cs { color: #60a0b0; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
diff --git a/api/audmetric.accuracy.html b/api/audmetric.accuracy.html
index 82a1efa..97ae6be 100644
--- a/api/audmetric.accuracy.html
+++ b/api/audmetric.accuracy.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -228,7 +228,7 @@ accuracy()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -236,7 +236,7 @@ accuracy()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.concordance_cc.html b/api/audmetric.concordance_cc.html
index 7a60724..f77ad30 100644
--- a/api/audmetric.concordance_cc.html
+++ b/api/audmetric.concordance_cc.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -168,7 +168,7 @@
concordance_cc()¶
-
-audmetric.concordance_cc(truth, prediction)[source]¶
+audmetric.concordance_cc(truth, prediction, *, ignore_nan=False)[source]¶
Concordance correlation coefficient.
@@ -240,7 +244,7 @@ concordance_cc()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.confusion_matrix.html b/api/audmetric.confusion_matrix.html
index fc55b66..6d67495 100644
--- a/api/audmetric.confusion_matrix.html
+++ b/api/audmetric.confusion_matrix.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -227,7 +227,7 @@ confusion_matrix()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -235,7 +235,7 @@ confusion_matrix()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.detection_error_tradeoff.html b/api/audmetric.detection_error_tradeoff.html
index e3675d1..2073fdb 100644
--- a/api/audmetric.detection_error_tradeoff.html
+++ b/api/audmetric.detection_error_tradeoff.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -186,13 +186,13 @@ detection_error_tradeoff()truth may only contain entries like [1, 0, True, False...]
,
whereas prediction values
can also contain similarity scores, e.g. [0.8, 0.1, ...]
.
-The implementation is identical with the one provided
-by the pyeer package.
+The implementation was inspired by pyeer.eer_stats.calculate_roc but has
+been accelerated by using numpy-arrays instead of lists.
- Parameters
-truth (Union
[bool
, int
, Sequence
[Union
[bool
, int
]]]) – ground truth classes
-prediction (Union
[bool
, int
, float
, Sequence
[Union
[bool
, int
, float
]]]) – predicted classes or similarity scores
+truth (Sequence
[Union
[bool
, int
]]) – ground truth classes
+prediction (Sequence
[Union
[bool
, int
, float
]]) – predicted classes or similarity scores
- Return type
@@ -245,7 +245,7 @@ detection_error_tradeoff()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -253,7 +253,7 @@ detection_error_tradeoff()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.edit_distance.html b/api/audmetric.edit_distance.html
index 1fc382b..44606e9 100644
--- a/api/audmetric.edit_distance.html
+++ b/api/audmetric.edit_distance.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -186,8 +186,8 @@ edit_distance()Examples
->>> truth = 'lorem'
->>> prediction = 'lorm'
+>>> truth = "lorem"
+>>> prediction = "lorm"
>>> edit_distance(truth, prediction)
1
>>> truth = [0, 1, 2]
@@ -223,7 +223,7 @@ edit_distance()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -231,7 +231,7 @@ edit_distance()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.equal_error_rate.html b/api/audmetric.equal_error_rate.html
index 9b6f5b2..ff73b27 100644
--- a/api/audmetric.equal_error_rate.html
+++ b/api/audmetric.equal_error_rate.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -202,8 +202,8 @@ equal_error_rate()
Parameters
-truth (Union
[bool
, int
, Sequence
[Union
[bool
, int
]]]) – ground truth classes
-prediction (Union
[bool
, int
, float
, Sequence
[Union
[bool
, int
, float
]]]) – predicted classes or similarity scores
+truth (Sequence
[Union
[bool
, int
]]) – ground truth classes
+prediction (Sequence
[Union
[bool
, int
, float
]]) – predicted classes or similarity scores
Return type
@@ -264,7 +264,7 @@ equal_error_rate()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -272,7 +272,7 @@ equal_error_rate()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.event_error_rate.html b/api/audmetric.event_error_rate.html
index 869629a..268e7ad 100644
--- a/api/audmetric.event_error_rate.html
+++ b/api/audmetric.event_error_rate.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -199,9 +199,9 @@ event_error_rate()0.5
>>> event_error_rate([[0, 1], [2]], [[0], [2]])
0.25
->>> event_error_rate(['lorem'], ['lorm'])
+>>> event_error_rate(["lorem"], ["lorm"])
0.2
->>> event_error_rate(['lorem', 'ipsum'], ['lorm', 'ipsum'])
+>>> event_error_rate(["lorem", "ipsum"], ["lorm", "ipsum"])
0.1
@@ -232,7 +232,7 @@ event_error_rate()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -240,7 +240,7 @@ event_error_rate()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.fscore_per_class.html b/api/audmetric.fscore_per_class.html
index 3fc3c42..d8417ef 100644
--- a/api/audmetric.fscore_per_class.html
+++ b/api/audmetric.fscore_per_class.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -225,7 +225,7 @@ fscore_per_class()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -233,7 +233,7 @@ fscore_per_class()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.html b/api/audmetric.html
index 7b3dcc1..4a63765 100644
--- a/api/audmetric.html
+++ b/api/audmetric.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -258,7 +258,7 @@
- Built with Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -266,7 +266,7 @@
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.linkability.html b/api/audmetric.linkability.html
index a75b527..4815fc5 100644
--- a/api/audmetric.linkability.html
+++ b/api/audmetric.linkability.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -223,14 +223,12 @@ linkability()>>> truth = [1, 0] * int(samples / 2)
>>> prediction = []
>>> for _ in range(int(samples / 2)):
-... prediction.extend(
-... [np.random.uniform(0, 0.2), np.random.uniform(0.8, 1.0)]
-... )
+... prediction.extend([np.random.uniform(0, 0.2), np.random.uniform(0.8, 1.0)])
>>> linkability(truth, prediction)
0.9747999999999999
>>> truth = [1, 0, 0, 0] * int(samples / 4)
>>> prediction = [np.random.uniform(0, 1) for _ in range(samples)]
->>> linkability(truth, prediction, omega=1/3)
+>>> linkability(truth, prediction, omega=1 / 3)
0.0
@@ -261,7 +259,7 @@ linkability()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -269,7 +267,7 @@ linkability()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.mean_absolute_error.html b/api/audmetric.mean_absolute_error.html
index c395652..7dcf6db 100644
--- a/api/audmetric.mean_absolute_error.html
+++ b/api/audmetric.mean_absolute_error.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -221,7 +221,7 @@ mean_absolute_error()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -229,7 +229,7 @@ mean_absolute_error()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.mean_squared_error.html b/api/audmetric.mean_squared_error.html
index c88611f..c56d315 100644
--- a/api/audmetric.mean_squared_error.html
+++ b/api/audmetric.mean_squared_error.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -221,7 +221,7 @@ mean_squared_error()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -229,7 +229,7 @@ mean_squared_error()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.pearson_cc.html b/api/audmetric.pearson_cc.html
index ccd4c08..42e2739 100644
--- a/api/audmetric.pearson_cc.html
+++ b/api/audmetric.pearson_cc.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -223,7 +223,7 @@ pearson_cc()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -231,7 +231,7 @@ pearson_cc()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.precision_per_class.html b/api/audmetric.precision_per_class.html
index 13a3287..bff3041 100644
--- a/api/audmetric.precision_per_class.html
+++ b/api/audmetric.precision_per_class.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -224,7 +224,7 @@ precision_per_class()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -232,7 +232,7 @@ precision_per_class()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.recall_per_class.html b/api/audmetric.recall_per_class.html
index a0f3a6a..f99870e 100644
--- a/api/audmetric.recall_per_class.html
+++ b/api/audmetric.recall_per_class.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -224,7 +224,7 @@ recall_per_class()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -232,7 +232,7 @@ recall_per_class()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.unweighted_average_bias.html b/api/audmetric.unweighted_average_bias.html
index ceb4651..8c0016c 100644
--- a/api/audmetric.unweighted_average_bias.html
+++ b/api/audmetric.unweighted_average_bias.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -232,21 +232,22 @@ unweighted_average_bias()Examples
->>> unweighted_average_bias([1, 1], [1, 0], ['male', 'female'])
+>>> unweighted_average_bias([1, 1], [1, 0], ["male", "female"])
0.5
>>> unweighted_average_bias(
-... [1, 1], [1, 0], ['male', 'female'],
-... subgroups=['female', 'male'],
+... [1, 1],
+... [1, 0],
+... ["male", "female"],
+... subgroups=["female", "male"],
... reduction=lambda x: x[0] - x[1],
... )
-1.0
->>> unweighted_average_bias(
-... [0, 1], [1, 0], ['male', 'female'],
-... metric=recall_per_class
-... )
+>>> unweighted_average_bias([0, 1], [1, 0], ["male", "female"], metric=recall_per_class)
nan
>>> unweighted_average_bias(
-... [0, 0, 0, 0], [1, 1, 0, 0], ['a', 'b', 'c', 'd'],
+... [0, 0, 0, 0],
+... [1, 1, 0, 0],
+... ["a", "b", "c", "d"],
... metric=recall_per_class,
... )
0.5
@@ -279,7 +280,7 @@ unweighted_average_bias()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -287,7 +288,7 @@ unweighted_average_bias()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.unweighted_average_fscore.html b/api/audmetric.unweighted_average_fscore.html
index 53da372..56103c3 100644
--- a/api/audmetric.unweighted_average_fscore.html
+++ b/api/audmetric.unweighted_average_fscore.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -226,7 +226,7 @@ unweighted_average_fscore()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -234,7 +234,7 @@ unweighted_average_fscore()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.unweighted_average_precision.html b/api/audmetric.unweighted_average_precision.html
index f1273db..c49c87a 100644
--- a/api/audmetric.unweighted_average_precision.html
+++ b/api/audmetric.unweighted_average_precision.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -225,7 +225,7 @@ unweighted_average_precision()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -233,7 +233,7 @@ unweighted_average_precision()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.unweighted_average_recall.html b/api/audmetric.unweighted_average_recall.html
index fe8dcc1..78c304f 100644
--- a/api/audmetric.unweighted_average_recall.html
+++ b/api/audmetric.unweighted_average_recall.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -225,7 +225,7 @@ unweighted_average_recall()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -233,7 +233,7 @@ unweighted_average_recall()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.utils.html b/api/audmetric.utils.html
index a98a961..40c50d4 100644
--- a/api/audmetric.utils.html
+++ b/api/audmetric.utils.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -182,7 +182,7 @@
- Built with Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -190,7 +190,7 @@
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.utils.infer_labels.html b/api/audmetric.utils.infer_labels.html
index f870e06..0ff292f 100644
--- a/api/audmetric.utils.infer_labels.html
+++ b/api/audmetric.utils.infer_labels.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -194,7 +194,7 @@ infer_labels()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -202,7 +202,7 @@ infer_labels()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.weighted_confusion_error.html b/api/audmetric.weighted_confusion_error.html
index 8692169..ee84ec5 100644
--- a/api/audmetric.weighted_confusion_error.html
+++ b/api/audmetric.weighted_confusion_error.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -203,7 +203,7 @@ weighted_confusion_error()>>> truth = [0, 1, 2]
>>> prediction = [0, 2, 0]
>>> # penalize only errors > 1
->>> weights = [[0, 0 , 1], [0, 0, 0], [1, 0, 0]]
+>>> weights = [[0, 0, 1], [0, 0, 0], [1, 0, 0]]
>>> weighted_confusion_error(truth, prediction, weights)
0.5
@@ -235,7 +235,7 @@ weighted_confusion_error()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -243,7 +243,7 @@ weighted_confusion_error()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/api/audmetric.word_error_rate.html b/api/audmetric.word_error_rate.html
index 1ba1f24..e03435b 100644
--- a/api/audmetric.word_error_rate.html
+++ b/api/audmetric.word_error_rate.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -188,8 +188,8 @@ word_error_rate()Examples
->>> truth = [['lorem', 'ipsum'], ['north', 'wind', 'and', 'sun']]
->>> prediction = [['lorm', 'ipsum'], ['north', 'wind']]
+>>> truth = [["lorem", "ipsum"], ["north", "wind", "and", "sun"]]
+>>> prediction = [["lorm", "ipsum"], ["north", "wind"]]
>>> word_error_rate(truth, prediction)
0.5
@@ -221,7 +221,7 @@ word_error_rate()Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -229,7 +229,7 @@ word_error_rate()
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/changelog.html b/changelog.html
index 525b4ce..cd69934 100644
--- a/changelog.html
+++ b/changelog.html
@@ -29,7 +29,7 @@
-
+
@@ -66,7 +66,7 @@
- v1.2.0
+ v1.2.1
@@ -104,6 +104,7 @@
- Contributing
- Changelog
+- Version 1.2.1 (2024/02/28)
- Version 1.2.0 (2023/05/08)
- Version 1.1.6 (2023/01/03)
- Version 1.1.5 (2023/01/03)
@@ -157,6 +158,17 @@ ChangelogKeep a Changelog,
and this project adheres to Semantic Versioning.
+
+Version 1.2.1 (2024/02/28)¶
+
+Added: ignore_nan
argument
+to audmetric.concordance_cc()
+Added: support for Python 3.12
+Changed: speedup audmetric.detection_error_tradeoff()
+Fixed: avoid deprecation warning for pkg_resources
+Removed: support for Python 3.7
+
+
Version 1.2.0 (2023/05/08)¶
@@ -254,7 +266,7 @@ Version 1.0.0 (2021/06/09)Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -262,7 +274,7 @@ Version 1.0.0 (2021/06/09)
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/contributing.html b/contributing.html
index 7d2f336..513c2c5 100644
--- a/contributing.html
+++ b/contributing.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -152,30 +152,37 @@
Contributing¶
Everyone is invited to contribute to this project.
Feel free to create a pull request .
-If you find errors, omissions, inconsistencies or other things
-that need improvement, please create an issue.
+If you find errors,
+omissions,
+inconsistencies,
+or other things
+that need improvement,
+please create an issue.
Development Installation¶
-Instead of pip-installing the latest release from PyPI,
-you should get the newest development version from Github:
+Instead of pip-installing the latest release from PyPI,
+you should get the newest development version from Github:
git clone https://github.com/audeering/audmetric/
cd audmetric
-# Create virutal environment for this project
+# Create virtual environment for this project
# e.g.
# virtualenv --python="python3" $HOME/.envs/audmetric
# source $HOME/.envs/audmetric/bin/activate
pip install -r requirements.txt
-This way, your installation always stays up-to-date,
+
This way,
+your installation always stays up-to-date,
even if you pull new changes from the Github repository.
Coding Convention¶
We follow the PEP8 convention for Python code
-and check for correct syntax with flake8.
-Exceptions are defined under the [flake8]
section
-in setup.cfg
.
+and use ruff as a linter and code formatter.
+In addition,
+we check for common spelling errors with codespell.
+Both tools and possible exceptions
+are defined in pyproject.toml
.
The checks are executed in the CI using pre-commit.
You can enable those checks locally by executing:
pip install pre-commit # consider system wide installation
@@ -183,26 +190,28 @@ Coding Conventionpre-commit run --all-files
-Afterwards flake8 is executed
+
Afterwards ruff and codespell are executed
every time you create a commit.
-You can also install flake8
+
You can also install ruff and codespell
and call it directly:
-pip install flake8 # consider system wide installation
-flake8
+pip install ruff codespell # consider system wide installation
+ruff check --fix . # lint all Python files, and fix any fixable errors
+ruff format . # format code of all Python files
+codespell
It can be restricted to specific folders:
-flake8 audfoo/ tests/
+ruff check audmetric/ tests/
+codespell audmetric/ tests/
Building the Documentation¶
If you make changes to the documentation,
-you can re-create the HTML pages using Sphinx.
+you can re-create the HTML pages using Sphinx.
You can install it and a few other necessary packages with:
-pip install -r requirements.txt
-pip install -r docs/requirements.txt
+pip install -r docs/requirements.txt
To create the HTML pages, use:
@@ -212,13 +221,13 @@ Building the Documentationbuild/sphinx/html/.
It is also possible to automatically check if all links are still valid:
-python -m sphinx docs/ build/sphinx/linkcheck -b linkcheck
+python -m sphinx docs/ build/sphinx/html -b linkcheck
Running the Tests¶
-You’ll need pytest for that.
+
You’ll need pytest for that.
It can be installed with:
pip install -r tests/requirements.txt
@@ -263,7 +272,7 @@ Creating a New ReleaseSphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -271,7 +280,7 @@ Creating a New Release
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/genindex.html b/genindex.html
index 5c44138..351298a 100644
--- a/genindex.html
+++ b/genindex.html
@@ -29,7 +29,7 @@
-
+
@@ -65,7 +65,7 @@
- v1.2.0
+ v1.2.1
@@ -323,7 +323,7 @@ W
- Built with Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -331,7 +331,7 @@ W
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/index.html b/index.html
index bb78a5f..1a952c2 100644
--- a/index.html
+++ b/index.html
@@ -29,7 +29,7 @@
-
+
@@ -66,7 +66,7 @@
- v1.2.0
+ v1.2.1
@@ -142,7 +142,7 @@
audmetric¶
-
+
audmetric includes several equations
to estimate the performance of a machine learning prediction algorithm.
Some of the metrics are also available in sklearn,
@@ -179,7 +179,7 @@
audmetricSphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -187,7 +187,7 @@ audmetric
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/install.html b/install.html
index d69208a..af5ea2e 100644
--- a/install.html
+++ b/install.html
@@ -29,7 +29,7 @@
-
+
@@ -67,7 +67,7 @@
- v1.2.0
+ v1.2.1
@@ -175,7 +175,7 @@ InstallationSphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -183,7 +183,7 @@ Installation
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/objects.inv b/objects.inv
index f82e91c..53dec38 100644
Binary files a/objects.inv and b/objects.inv differ
diff --git a/py-modindex.html b/py-modindex.html
index 1a3258e..e0660a2 100644
--- a/py-modindex.html
+++ b/py-modindex.html
@@ -29,7 +29,7 @@
-
+
@@ -68,7 +68,7 @@
- v1.2.0
+ v1.2.1
@@ -179,7 +179,7 @@ Python Module Index
- Built with Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -187,7 +187,7 @@ Python Module Index
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/search.html b/search.html
index c9f0b0c..78cc083 100644
--- a/search.html
+++ b/search.html
@@ -29,7 +29,7 @@
-
+
@@ -65,7 +65,7 @@
- v1.2.0
+ v1.2.1
@@ -166,7 +166,7 @@
- Built with Sphinx on 2023/05/08 using the audEERING theme
+ Built with Sphinx on 2024/02/28 using the audEERING theme
@@ -174,7 +174,7 @@
- © 2019-2023 audEERING GmbH
+ © 2019-2024 audEERING GmbH
diff --git a/searchindex.js b/searchindex.js
index 5be8b99..5db6e11 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["api/audmetric", "api/audmetric.accuracy", "api/audmetric.concordance_cc", "api/audmetric.confusion_matrix", "api/audmetric.detection_error_tradeoff", "api/audmetric.edit_distance", "api/audmetric.equal_error_rate", "api/audmetric.event_error_rate", "api/audmetric.fscore_per_class", "api/audmetric.linkability", "api/audmetric.mean_absolute_error", "api/audmetric.mean_squared_error", "api/audmetric.pearson_cc", "api/audmetric.precision_per_class", "api/audmetric.recall_per_class", "api/audmetric.unweighted_average_bias", "api/audmetric.unweighted_average_fscore", "api/audmetric.unweighted_average_precision", "api/audmetric.unweighted_average_recall", "api/audmetric.utils", "api/audmetric.utils.infer_labels", "api/audmetric.weighted_confusion_error", "api/audmetric.word_error_rate", "changelog", "contributing", "genindex", "index", "install"], "filenames": ["api/audmetric.rst", "api/audmetric.accuracy.rst", "api/audmetric.concordance_cc.rst", "api/audmetric.confusion_matrix.rst", "api/audmetric.detection_error_tradeoff.rst", "api/audmetric.edit_distance.rst", "api/audmetric.equal_error_rate.rst", "api/audmetric.event_error_rate.rst", "api/audmetric.fscore_per_class.rst", "api/audmetric.linkability.rst", "api/audmetric.mean_absolute_error.rst", "api/audmetric.mean_squared_error.rst", "api/audmetric.pearson_cc.rst", "api/audmetric.precision_per_class.rst", "api/audmetric.recall_per_class.rst", "api/audmetric.unweighted_average_bias.rst", "api/audmetric.unweighted_average_fscore.rst", "api/audmetric.unweighted_average_precision.rst", "api/audmetric.unweighted_average_recall.rst", "api/audmetric.utils.rst", "api/audmetric.utils.infer_labels.rst", "api/audmetric.weighted_confusion_error.rst", "api/audmetric.word_error_rate.rst", "changelog.rst", "contributing.rst", "genindex.rst", "index.rst", "install.rst"], "titles": ["audmetric", "accuracy()", "concordance_cc()", "confusion_matrix()", "detection_error_tradeoff()", "edit_distance()", "equal_error_rate()", "event_error_rate()", "fscore_per_class()", "linkability()", "mean_absolute_error()", "mean_squared_error()", "pearson_cc()", "precision_per_class()", "recall_per_class()", "unweighted_average_bias()", "unweighted_average_fscore()", "unweighted_average_precision()", "unweighted_average_recall()", "audmetric.utils", "infer_labels()", "weighted_confusion_error()", "word_error_rate()", "Changelog", "Contributing", "Index", "audmetric", "Installation"], "terms": {"audmetr": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 27], "truth": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23], "predict": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 26], "label": [1, 3, 8, 13, 14, 15, 16, 17, 18, 20, 21], "none": [1, 3, 8, 9, 13, 14, 15, 16, 17, 18, 21], "sourc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 24, 27], "classif": 1, "text": [1, 2, 3, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21], "frac": [1, 2, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18], "number": [1, 7, 9, 21], "correct": [1, 23, 24], "total": 1, "paramet": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22], "sequenc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22], "ani": [1, 3, 8, 13, 14, 15, 16, 17, 18, 20, 21], "ground": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22], "valu": [1, 2, 3, 4, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21], "class": [1, 3, 4, 6, 7, 8, 9, 13, 14, 15, 16, 17, 18, 21], "option": [1, 3, 8, 9, 13, 14, 15, 16, 17, 18, 21], "union": [1, 3, 4, 5, 6, 7, 9, 21], "str": [1, 5, 7, 8, 13, 14, 15, 22], "int": [1, 3, 4, 5, 6, 7, 9, 21], "includ": [1, 3, 8, 13, 14, 15, 16, 17, 18, 21, 26], "prefer": [1, 3, 8, 13, 14, 15, 16, 17, 18, 21], "order": [1, 3, 8, 13, 14, 15, 16, 17, 18, 20, 21], "sampl": [1, 9, 15, 21], "i": [1, 2, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 23, 24], "consid": [1, 24], "comput": [1, 7, 15, 21], "either": 1, "logic": 1, "OR": 1, "contain": [1, 4, 6, 9, 15], "If": [1, 3, 8, 9, 13, 14, 15, 16, 17, 18, 21, 24], "ar": [1, 3, 6, 8, 13, 14, 15, 16, 17, 18, 20, 21, 24, 26], "suppli": [1, 3, 8, 13, 14, 15, 16, 17, 18, 21], "thei": [1, 3, 8, 13, 14, 15, 16, 17, 18, 21], "infer": [1, 3, 8, 13, 14, 15, 16, 17, 18, 20, 21], "from": [1, 3, 4, 6, 8, 9, 13, 14, 15, 16, 17, 18, 20, 21, 24], "alphabet": [1, 3, 8, 13, 14, 15, 16, 17, 18, 21], "return": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22], "type": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22], "float": [1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22], "0": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22], "1": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21], "rais": [1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 15, 22], "valueerror": [1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 15, 22], "differ": [1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 15, 22], "length": [1, 2, 3, 7, 10, 11, 12, 15, 22], "exampl": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22], "5": [1, 6, 7, 10, 11, 14, 15, 17, 21, 22], "concord": 2, "correl": [2, 12], "coeffici": [2, 12], "rho_c": 2, "2": [2, 3, 5, 6, 7, 8, 9, 11, 12, 16, 21], "rho": [2, 12], "sigma_": [2, 12], "mu_": 2, "where": [2, 6, 12], "pearson": [2, 12], "mu": 2, "mean": [2, 7, 9, 10, 11, 21], "sigma": [2, 12], "varianc": 2, "lawrenc": 2, "kuei": 2, "lin": 2, "A": [2, 6, 21], "evalu": [2, 9], "reproduc": 2, "biometr": [2, 9], "45": 2, "255": 2, "268": 2, "1989": 2, "doi": [2, 6, 9], "10": [2, 6, 9], "2307": 2, "2532051": 2, "6666666666666666": [2, 8], "normal": [3, 7, 21], "fals": [3, 4, 6, 8, 9, 13, 14, 16, 17, 18], "confus": [3, 21], "matrix": [3, 21], "bool": [3, 4, 6, 9], "over": [3, 7, 9], "row": [3, 21], "list": [3, 20, 21], "detect": 4, "error": [4, 6, 7, 10, 11, 21, 22, 24], "tradeoff": 4, "verif": [4, 6, 9], "experi": 4, "The": [4, 5, 6, 7, 9, 15, 21, 23, 24], "det": 4, "graph": 4, "show": 4, "non": [4, 6, 9], "match": [4, 6], "rate": [4, 6, 7, 22], "fnmr": [4, 6], "against": 4, "fmr": [4, 6], "indic": [4, 6], "how": [4, 6], "often": [4, 6], "an": [4, 6, 7, 9, 24], "enrol": [4, 6], "speaker": [4, 6], "wa": [4, 6], "miss": [4, 6, 23], "impostor": [4, 6], "verifi": [4, 6], "thi": [4, 6, 15, 21, 23, 24], "function": [4, 15, 23], "doe": 4, "figur": 4, "togeth": 4, "correspond": [4, 6, 7, 15], "threshold": [4, 6], "which": [4, 9, 15, 26], "similar": [4, 6, 9], "regard": 4, "belong": 4, "mai": [4, 6], "onli": [4, 6, 15, 21, 26], "entri": [4, 6], "like": [4, 6, 9], "true": [4, 6, 8, 9, 13, 14, 16, 17, 18], "wherea": [4, 6], "can": [4, 6, 9, 15, 24], "also": [4, 6, 24, 26], "score": [4, 6, 7, 8, 9, 15, 16], "e": [4, 6, 15, 24, 27], "g": [4, 6, 15, 24, 27], "8": [4, 6, 9], "implement": [4, 5, 6, 9], "ident": [4, 6, 15, 26], "one": [4, 6], "provid": [4, 6, 9, 23], "pyeer": [4, 6], "packag": [4, 6, 23, 24, 26], "tupl": [4, 6], "ndarrai": 4, "9": [4, 23], "arrai": [4, 23], "edit": [5, 7, 22], "distanc": [5, 7, 22], "between": [5, 15], "two": [5, 9, 15], "char": 5, "follow": [5, 21, 24], "wagner": 5, "fischer": 5, "algorithm": [5, 26], "lorem": [5, 7, 22], "lorm": [5, 7, 22], "equal": [6, 15], "task": [6, 9], "eer": 6, "point": 6, "In": 6, "practic": 6, "distribut": [6, 9], "continu": 6, "interv": 6, "instead": [6, 24], "set": [6, 8, 9, 13, 14, 16, 17, 18], "midpoint": 6, "min": [6, 9], "t": 6, "max": [6, 9], "argmin": 6, "d": [6, 15], "maio": 6, "maltoni": 6, "r": [6, 21, 24], "cappelli": 6, "j": [6, 9], "l": 6, "wayman": 6, "k": [6, 16, 17, 18], "jain": 6, "fvc2000": 6, "fingerprint": 6, "competit": 6, "ieee": [6, 9], "transact": [6, 9], "pattern": 6, "analysi": 6, "machin": [6, 26], "intellig": 6, "24": 6, "402": 6, "412": 6, "2002": 6, "1109": [6, 9], "34": 6, "990140": 6, "namedtupl": 6, "last": 6, "4": [6, 9], "stat": 6, "16666666666666666": 6, "event": 7, "base": [7, 9, 22, 23], "aggreg": 7, "each": [7, 15, 21, 23], "pair": 7, "averag": [7, 15, 16, 17, 18], "longer": 7, "By": 7, "bound": 7, "25": [7, 18], "ipsum": [7, 22], "zero_divis": [8, 13, 14, 16, 17, 18], "f": [8, 16], "per": [8, 13, 14], "fscore": 8, "_k": [8, 13, 14, 16, 17, 18], "posit": [8, 13, 14, 16, 17, 18, 21], "neg": [8, 14, 15, 16, 18], "when": [8, 13, 14, 16, 17, 18, 23], "zero": [8, 13, 14, 16, 17, 18], "divis": [8, 13, 14, 16, 17, 18], "dict": [8, 13, 14, 15], "dictionari": [8, 13, 14], "kei": [8, 13, 14], "omega": 9, "nbin": 9, "let": 9, "": 9, "test": [9, 26], "clip": 9, "local": [9, 24], "metric": [9, 15, 26], "defin": [9, 24], "p": 9, "mate": 9, "higher": [9, 21], "more": [9, 15, 21], "attack": 9, "link": [9, 24], "global": 9, "d_": 9, "sy": 9, "all": [9, 15, 20, 21, 23, 24], "rang": 9, "code": 9, "m": [9, 24], "maouch": 9, "licens": 9, "under": [9, 24], "lgpl": 9, "gomez": 9, "barrero": 9, "galbal": 9, "c": [9, 15, 21], "rathgeb": 9, "busch": 9, "gener": [9, 24], "framework": 9, "unlink": 9, "templat": 9, "protect": [9, 15], "system": [9, 24], "inform": 9, "forens": 9, "secur": 9, "13": 9, "1406": 9, "1420": 9, "2017": 9, "tif": 9, "2788000": 9, "prior": 9, "ratio": 9, "bin": [9, 24, 27], "histogram": 9, "estim": [9, 15, 26], "len": 9, "100": 9, "np": 9, "random": 9, "seed": 9, "10000": 9, "_": 9, "extend": 9, "uniform": 9, "9747999999999999": 9, "3": 9, "absolut": [10, 15], "mae": 10, "n": [10, 11], "sum": [10, 11, 16, 17, 18, 21], "n_": [10, 11], "squar": 11, "mse": 11, "cov": 12, "standard": [12, 15], "deviat": [12, 15], "covari": 12, "8660254037844385": 12, "precis": [13, 15, 16, 17], "recal": [14, 15, 18], "protected_vari": 15, "subgroup": 15, "fscore_per_class": 15, "reduct": 15, "std": 15, "unweight": [15, 16, 17, 18], "bia": 15, "variabl": 15, "measur": 15, "term": 15, "odd": 15, "requir": [15, 23, 24], "classifi": [15, 21], "have": [15, 26], "perform": [15, 26], "independ": 15, "race": 15, "its": 15, "assess": 15, "denot": 15, "diverg": 15, "wai": [15, 24], "well": 15, "For": [15, 26], "serv": 15, "choic": 15, "than": 15, "could": 15, "less": 15, "exhibit": 15, "ignor": 15, "occur": 15, "femal": 15, "sex": 15, "manifest": 15, "male": 15, "specifi": 15, "direct": 15, "determin": 15, "besid": 15, "_variabl": 15, "alphanumer": 15, "callabl": 15, "typic": 15, "recall_per_class": 15, "precision_per_class": 15, "oper": 15, "lambda": 15, "x": [15, 24], "nan": 15, "b": [15, 24], "uaf": 16, "k_": [16, 17, 18], "3333333333333333": 16, "uap": 17, "uar": 18, "util": [20, 23], "It": [20, 24], "gather": 20, "present": 20, "sort": 20, "weight": 21, "appli": 21, "given": 21, "cell": 21, "them": 21, "up": [21, 24], "expect": 21, "costli": 21, "taken": 21, "account": 21, "usual": 21, "case": 21, "diagon": 21, "hold": 21, "correctli": 21, "form": 21, "column": 21, "w_r0_c0": 21, "w_r0_cn": 21, "w_rn_c0": 21, "w_rn_cn": 21, "penal": 21, "word": 22, "string": 22, "north": 22, "wind": 22, "sun": 22, "notabl": 23, "chang": [23, 24], "project": [23, 24], "document": 23, "file": [23, 24], "format": 23, "keep": 23, "adher": 23, "semant": 23, "ad": 23, "linkabl": 23, "speedup": 23, "concordance_cc": 23, "pearson_cc": 23, "numpi": [23, 26], "fix": 23, "sphinx": [23, 24], "audeer": [23, 24], "theme": 23, "enforc": 23, "publish": 23, "doc": [23, 24], "support": 23, "python": [23, 24, 27], "split": 23, "api": 23, "sub": 23, "page": [23, 24], "accuraci": 23, "formula": 23, "docstr": 23, "refer": 23, "ccc": 23, "panda": 23, "seri": 23, "datatyp": 23, "int64": 23, "typo": 23, "mean_absolute_error": 23, "remov": 23, "infer_label": 23, "equal_error_r": 23, "detection_error_tradeoff": 23, "broken": 23, "due": 23, "__init_": 23, "py": 23, "initi": 23, "public": 23, "releas": 23, "everyon": 24, "invit": 24, "feel": 24, "free": 24, "pull": 24, "request": 24, "you": 24, "find": 24, "omiss": 24, "inconsist": 24, "other": 24, "thing": 24, "need": 24, "improv": 24, "pleas": 24, "issu": 24, "pip": [24, 27], "latest": 24, "pypi": 24, "should": 24, "get": 24, "newest": 24, "version": 24, "github": 24, "git": 24, "clone": 24, "http": 24, "com": 24, "cd": 24, "virut": 24, "environ": [24, 27], "virtualenv": [24, 27], "python3": [24, 27], "home": [24, 27], "env": [24, 27], "activ": [24, 27], "txt": 24, "your": 24, "alwai": 24, "stai": 24, "date": 24, "even": 24, "repositori": 24, "we": [24, 26], "pep8": 24, "check": 24, "syntax": 24, "flake8": 24, "except": 24, "section": 24, "setup": 24, "cfg": 24, "execut": 24, "ci": 24, "us": 24, "pre": 24, "commit": 24, "enabl": 24, "those": [24, 26], "wide": 24, "afterward": 24, "everi": 24, "time": 24, "call": 24, "directli": 24, "restrict": 24, "specif": 24, "folder": 24, "audfoo": 24, "make": 24, "re": 24, "html": 24, "few": 24, "necessari": 24, "To": [24, 27], "avail": [24, 26], "directori": 24, "possibl": 24, "automat": 24, "still": 24, "valid": 24, "linkcheck": 24, "ll": 24, "pytest": 24, "simpli": 24, "made": 24, "step": 24, "updat": 24, "changelog": 24, "rst": 24, "y": 24, "z": 24, "annot": 24, "tag": 24, "push": 24, "sever": 26, "equat": 26, "learn": 26, "some": 26, "sklearn": 26, "want": 26, "depend": 26, "result": 26, "run": 27, "creat": 27, "virtual": 27}, "objects": {"": [[0, 0, 0, "-", "audmetric"]], "audmetric": [[1, 1, 1, "", "accuracy"], [2, 1, 1, "", "concordance_cc"], [3, 1, 1, "", "confusion_matrix"], [4, 1, 1, "", "detection_error_tradeoff"], [5, 1, 1, "", "edit_distance"], [6, 1, 1, "", "equal_error_rate"], [7, 1, 1, "", "event_error_rate"], [8, 1, 1, "", "fscore_per_class"], [9, 1, 1, "", "linkability"], [10, 1, 1, "", "mean_absolute_error"], [11, 1, 1, "", "mean_squared_error"], [12, 1, 1, "", "pearson_cc"], [13, 1, 1, "", "precision_per_class"], [14, 1, 1, "", "recall_per_class"], [15, 1, 1, "", "unweighted_average_bias"], [16, 1, 1, "", "unweighted_average_fscore"], [17, 1, 1, "", "unweighted_average_precision"], [18, 1, 1, "", "unweighted_average_recall"], [19, 0, 0, "-", "utils"], [21, 1, 1, "", "weighted_confusion_error"], [22, 1, 1, "", "word_error_rate"]], "audmetric.utils": [[20, 1, 1, "", "infer_labels"]]}, "objtypes": {"0": "py:module", "1": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"]}, "titleterms": {"audmetr": [0, 19, 26], "accuraci": 1, "concordance_cc": 2, "confusion_matrix": 3, "detection_error_tradeoff": 4, "edit_dist": 5, "equal_error_r": 6, "event_error_r": 7, "fscore_per_class": 8, "linkabl": 9, "mean_absolute_error": 10, "mean_squared_error": 11, "pearson_cc": 12, "precision_per_class": 13, "recall_per_class": 14, "unweighted_average_bia": 15, "unweighted_average_fscor": 16, "unweighted_average_precis": 17, "unweighted_average_recal": 18, "util": 19, "infer_label": 20, "weighted_confusion_error": 21, "word_error_r": 22, "changelog": 23, "version": 23, "1": 23, "2": 23, "0": 23, "2023": 23, "05": 23, "08": 23, "6": 23, "01": 23, "03": 23, "5": 23, "4": 23, "2022": 23, "07": 23, "3": 23, "02": 23, "16": 23, "11": 23, "2021": 23, "29": 23, "06": 23, "10": 23, "09": 23, "contribut": 24, "develop": 24, "instal": [24, 27], "code": 24, "convent": 24, "build": 24, "document": 24, "run": 24, "test": 24, "creat": 24, "new": 24, "releas": 24, "index": 25}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinxcontrib.bibtex": 9, "sphinx.ext.viewcode": 1, "sphinx": 57}, "alltitles": {"audmetric": [[0, "module-audmetric"], [26, "audmetric"]], "accuracy()": [[1, "accuracy"]], "concordance_cc()": [[2, "concordance-cc"]], "confusion_matrix()": [[3, "confusion-matrix"]], "detection_error_tradeoff()": [[4, "detection-error-tradeoff"]], "edit_distance()": [[5, "edit-distance"]], "equal_error_rate()": [[6, "equal-error-rate"]], "event_error_rate()": [[7, "event-error-rate"]], "fscore_per_class()": [[8, "fscore-per-class"]], "linkability()": [[9, "linkability"]], "mean_absolute_error()": [[10, "mean-absolute-error"]], "mean_squared_error()": [[11, "mean-squared-error"]], "pearson_cc()": [[12, "pearson-cc"]], "precision_per_class()": [[13, "precision-per-class"]], "recall_per_class()": [[14, "recall-per-class"]], "unweighted_average_bias()": [[15, "unweighted-average-bias"]], "unweighted_average_fscore()": [[16, "unweighted-average-fscore"]], "unweighted_average_precision()": [[17, "unweighted-average-precision"]], "unweighted_average_recall()": [[18, "unweighted-average-recall"]], "audmetric.utils": [[19, "module-audmetric.utils"]], "infer_labels()": [[20, "infer-labels"]], "weighted_confusion_error()": [[21, "weighted-confusion-error"]], "word_error_rate()": [[22, "word-error-rate"]], "Changelog": [[23, "changelog"]], "Version 1.2.0 (2023/05/08)": [[23, "version-1-2-0-2023-05-08"]], "Version 1.1.6 (2023/01/03)": [[23, "version-1-1-6-2023-01-03"]], "Version 1.1.5 (2023/01/03)": [[23, "version-1-1-5-2023-01-03"]], "Version 1.1.4 (2022/07/05)": [[23, "version-1-1-4-2022-07-05"]], "Version 1.1.3 (2022/02/16)": [[23, "version-1-1-3-2022-02-16"]], "Version 1.1.2 (2022/01/11)": [[23, "version-1-1-2-2022-01-11"]], "Version 1.1.1 (2022/01/03)": [[23, "version-1-1-1-2022-01-03"]], "Version 1.1.0 (2021/07/29)": [[23, "version-1-1-0-2021-07-29"]], "Version 1.0.1 (2021/06/10)": [[23, "version-1-0-1-2021-06-10"]], "Version 1.0.0 (2021/06/09)": [[23, "version-1-0-0-2021-06-09"]], "Contributing": [[24, "contributing"]], "Development Installation": [[24, "development-installation"]], "Coding Convention": [[24, "coding-convention"]], "Building the Documentation": [[24, "building-the-documentation"]], "Running the Tests": [[24, "running-the-tests"]], "Creating a New Release": [[24, "creating-a-new-release"]], "Index": [[25, "index"]], "Installation": [[27, "installation"]]}, "indexentries": {"audmetric": [[0, "module-audmetric"]], "module": [[0, "module-audmetric"], [19, "module-audmetric.utils"]], "accuracy() (in module audmetric)": [[1, "audmetric.accuracy"]], "concordance_cc() (in module audmetric)": [[2, "audmetric.concordance_cc"]], "confusion_matrix() (in module audmetric)": [[3, "audmetric.confusion_matrix"]], "detection_error_tradeoff() (in module audmetric)": [[4, "audmetric.detection_error_tradeoff"]], "edit_distance() (in module audmetric)": [[5, "audmetric.edit_distance"]], "equal_error_rate() (in module audmetric)": [[6, "audmetric.equal_error_rate"]], "event_error_rate() (in module audmetric)": [[7, "audmetric.event_error_rate"]], "fscore_per_class() (in module audmetric)": [[8, "audmetric.fscore_per_class"]], "linkability() (in module audmetric)": [[9, "audmetric.linkability"]], "mean_absolute_error() (in module audmetric)": [[10, "audmetric.mean_absolute_error"]], "mean_squared_error() (in module audmetric)": [[11, "audmetric.mean_squared_error"]], "pearson_cc() (in module audmetric)": [[12, "audmetric.pearson_cc"]], "precision_per_class() (in module audmetric)": [[13, "audmetric.precision_per_class"]], "recall_per_class() (in module audmetric)": [[14, "audmetric.recall_per_class"]], "unweighted_average_bias() (in module audmetric)": [[15, "audmetric.unweighted_average_bias"]], "unweighted_average_fscore() (in module audmetric)": [[16, "audmetric.unweighted_average_fscore"]], "unweighted_average_precision() (in module audmetric)": [[17, "audmetric.unweighted_average_precision"]], "unweighted_average_recall() (in module audmetric)": [[18, "audmetric.unweighted_average_recall"]], "audmetric.utils": [[19, "module-audmetric.utils"]], "infer_labels() (in module audmetric.utils)": [[20, "audmetric.utils.infer_labels"]], "weighted_confusion_error() (in module audmetric)": [[21, "audmetric.weighted_confusion_error"]], "word_error_rate() (in module audmetric)": [[22, "audmetric.word_error_rate"]]}})
\ No newline at end of file
+Search.setIndex({"docnames": ["api/audmetric", "api/audmetric.accuracy", "api/audmetric.concordance_cc", "api/audmetric.confusion_matrix", "api/audmetric.detection_error_tradeoff", "api/audmetric.edit_distance", "api/audmetric.equal_error_rate", "api/audmetric.event_error_rate", "api/audmetric.fscore_per_class", "api/audmetric.linkability", "api/audmetric.mean_absolute_error", "api/audmetric.mean_squared_error", "api/audmetric.pearson_cc", "api/audmetric.precision_per_class", "api/audmetric.recall_per_class", "api/audmetric.unweighted_average_bias", "api/audmetric.unweighted_average_fscore", "api/audmetric.unweighted_average_precision", "api/audmetric.unweighted_average_recall", "api/audmetric.utils", "api/audmetric.utils.infer_labels", "api/audmetric.weighted_confusion_error", "api/audmetric.word_error_rate", "changelog", "contributing", "genindex", "index", "install"], "filenames": ["api/audmetric.rst", "api/audmetric.accuracy.rst", "api/audmetric.concordance_cc.rst", "api/audmetric.confusion_matrix.rst", "api/audmetric.detection_error_tradeoff.rst", "api/audmetric.edit_distance.rst", "api/audmetric.equal_error_rate.rst", "api/audmetric.event_error_rate.rst", "api/audmetric.fscore_per_class.rst", "api/audmetric.linkability.rst", "api/audmetric.mean_absolute_error.rst", "api/audmetric.mean_squared_error.rst", "api/audmetric.pearson_cc.rst", "api/audmetric.precision_per_class.rst", "api/audmetric.recall_per_class.rst", "api/audmetric.unweighted_average_bias.rst", "api/audmetric.unweighted_average_fscore.rst", "api/audmetric.unweighted_average_precision.rst", "api/audmetric.unweighted_average_recall.rst", "api/audmetric.utils.rst", "api/audmetric.utils.infer_labels.rst", "api/audmetric.weighted_confusion_error.rst", "api/audmetric.word_error_rate.rst", "changelog.rst", "contributing.rst", "genindex.rst", "index.rst", "install.rst"], "titles": ["audmetric", "accuracy()", "concordance_cc()", "confusion_matrix()", "detection_error_tradeoff()", "edit_distance()", "equal_error_rate()", "event_error_rate()", "fscore_per_class()", "linkability()", "mean_absolute_error()", "mean_squared_error()", "pearson_cc()", "precision_per_class()", "recall_per_class()", "unweighted_average_bias()", "unweighted_average_fscore()", "unweighted_average_precision()", "unweighted_average_recall()", "audmetric.utils", "infer_labels()", "weighted_confusion_error()", "word_error_rate()", "Changelog", "Contributing", "Index", "audmetric", "Installation"], "terms": {"audmetr": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 27], "truth": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23], "predict": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 26], "label": [1, 3, 8, 13, 14, 15, 16, 17, 18, 20, 21], "none": [1, 3, 8, 9, 13, 14, 15, 16, 17, 18, 21], "sourc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 24, 27], "classif": 1, "text": [1, 2, 3, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21], "frac": [1, 2, 6, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18], "number": [1, 7, 9, 21], "correct": [1, 23], "total": 1, "paramet": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22], "sequenc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22], "ani": [1, 3, 8, 13, 14, 15, 16, 17, 18, 20, 21, 24], "ground": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22], "valu": [1, 2, 3, 4, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21], "class": [1, 3, 4, 6, 7, 8, 9, 13, 14, 15, 16, 17, 18, 21], "option": [1, 3, 8, 9, 13, 14, 15, 16, 17, 18, 21], "union": [1, 3, 4, 5, 6, 7, 9, 21], "str": [1, 5, 7, 8, 13, 14, 15, 22], "int": [1, 3, 4, 5, 6, 7, 9, 21], "includ": [1, 3, 8, 13, 14, 15, 16, 17, 18, 21, 26], "prefer": [1, 3, 8, 13, 14, 15, 16, 17, 18, 21], "order": [1, 3, 8, 13, 14, 15, 16, 17, 18, 20, 21], "sampl": [1, 2, 9, 15, 21], "i": [1, 2, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 23, 24], "consid": [1, 24], "comput": [1, 7, 15, 21], "either": 1, "logic": 1, "OR": 1, "contain": [1, 2, 4, 6, 9, 15], "If": [1, 3, 8, 9, 13, 14, 15, 16, 17, 18, 21, 24], "ar": [1, 2, 3, 6, 8, 13, 14, 15, 16, 17, 18, 20, 21, 24, 26], "suppli": [1, 3, 8, 13, 14, 15, 16, 17, 18, 21], "thei": [1, 3, 8, 13, 14, 15, 16, 17, 18, 21], "infer": [1, 3, 8, 13, 14, 15, 16, 17, 18, 20, 21], "from": [1, 3, 4, 6, 8, 9, 13, 14, 15, 16, 17, 18, 20, 21, 24], "alphabet": [1, 3, 8, 13, 14, 15, 16, 17, 18, 21], "return": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22], "type": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22], "float": [1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22], "0": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22], "1": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21], "rais": [1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 15, 22], "valueerror": [1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 15, 22], "differ": [1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 15, 22], "length": [1, 2, 3, 7, 10, 11, 12, 15, 22], "exampl": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 21, 22], "5": [1, 6, 7, 10, 11, 14, 15, 17, 21, 22], "ignore_nan": [2, 23], "fals": [2, 3, 4, 6, 8, 9, 13, 14, 16, 17, 18], "concord": 2, "correl": [2, 12], "coeffici": [2, 12], "rho_c": 2, "2": [2, 3, 5, 6, 7, 8, 9, 11, 12, 16, 21], "rho": [2, 12], "sigma_": [2, 12], "mu_": 2, "where": [2, 6, 12], "pearson": [2, 12], "mu": 2, "mean": [2, 7, 9, 10, 11, 21], "sigma": [2, 12], "varianc": 2, "lawrenc": 2, "kuei": 2, "lin": 2, "A": [2, 6, 21], "evalu": [2, 9], "reproduc": 2, "biometr": [2, 9], "45": 2, "255": 2, "268": 2, "1989": 2, "doi": [2, 6, 9], "10": [2, 6, 9], "2307": 2, "2532051": 2, "bool": [2, 3, 4, 6, 9], "true": [2, 4, 6, 8, 9, 13, 14, 16, 17, 18], "all": [2, 9, 15, 20, 21, 23, 24], "nan": [2, 15], "ignor": [2, 15], "6666666666666665": 2, "normal": [3, 7, 21], "confus": [3, 21], "matrix": [3, 21], "over": [3, 7, 9], "row": [3, 21], "list": [3, 4, 20, 21], "detect": 4, "error": [4, 6, 7, 10, 11, 21, 22, 24], "tradeoff": 4, "verif": [4, 6, 9], "experi": 4, "The": [4, 5, 6, 7, 9, 15, 21, 23, 24], "det": 4, "graph": 4, "show": 4, "non": [4, 6, 9], "match": [4, 6], "rate": [4, 6, 7, 22], "fnmr": [4, 6], "against": 4, "fmr": [4, 6], "indic": [4, 6], "how": [4, 6], "often": [4, 6], "an": [4, 6, 7, 9, 24], "enrol": [4, 6], "speaker": [4, 6], "wa": [4, 6], "miss": [4, 6, 23], "impostor": [4, 6], "verifi": [4, 6], "thi": [4, 6, 15, 21, 23, 24], "function": [4, 15, 23], "doe": 4, "figur": 4, "togeth": 4, "correspond": [4, 6, 7, 15], "threshold": [4, 6], "which": [4, 9, 15, 26], "similar": [4, 6, 9], "regard": 4, "belong": 4, "mai": [4, 6], "onli": [4, 6, 15, 21, 26], "entri": [4, 6], "like": [4, 6, 9], "wherea": [4, 6], "can": [4, 6, 9, 15, 24], "also": [4, 6, 24, 26], "score": [4, 6, 7, 8, 9, 15, 16], "e": [4, 6, 15, 24, 27], "g": [4, 6, 15, 24, 27], "8": [4, 6, 9], "implement": [4, 5, 6, 9], "inspir": 4, "pyeer": [4, 6], "eer_stat": 4, "calculate_roc": 4, "ha": 4, "been": 4, "acceler": 4, "us": [4, 24], "numpi": [4, 23, 26], "arrai": [4, 23], "instead": [4, 6, 24], "tupl": [4, 6], "ndarrai": 4, "9": [4, 23], "edit": [5, 7, 22], "distanc": [5, 7, 22], "between": [5, 15], "two": [5, 9, 15], "char": 5, "follow": [5, 21, 24], "wagner": 5, "fischer": 5, "algorithm": [5, 26], "lorem": [5, 7, 22], "lorm": [5, 7, 22], "equal": [6, 15], "task": [6, 9], "eer": 6, "point": 6, "ident": [6, 15, 26], "In": [6, 24], "practic": 6, "distribut": [6, 9], "continu": 6, "interv": 6, "set": [6, 8, 9, 13, 14, 16, 17, 18], "midpoint": 6, "min": [6, 9], "t": 6, "max": [6, 9], "argmin": 6, "one": 6, "provid": [6, 9, 23], "packag": [6, 23, 24, 26], "d": [6, 15], "maio": 6, "maltoni": 6, "r": [6, 21, 24], "cappelli": 6, "j": [6, 9], "l": 6, "wayman": 6, "k": [6, 16, 17, 18], "jain": 6, "fvc2000": 6, "fingerprint": 6, "competit": 6, "ieee": [6, 9], "transact": [6, 9], "pattern": 6, "analysi": 6, "machin": [6, 26], "intellig": 6, "24": 6, "402": 6, "412": 6, "2002": 6, "1109": [6, 9], "34": 6, "990140": 6, "namedtupl": 6, "last": 6, "4": [6, 9], "stat": 6, "16666666666666666": 6, "event": 7, "base": [7, 9, 22, 23], "aggreg": 7, "each": [7, 15, 21, 23], "pair": 7, "averag": [7, 15, 16, 17, 18], "longer": 7, "By": 7, "bound": 7, "25": [7, 18], "ipsum": [7, 22], "zero_divis": [8, 13, 14, 16, 17, 18], "f": [8, 16], "per": [8, 13, 14], "fscore": 8, "_k": [8, 13, 14, 16, 17, 18], "posit": [8, 13, 14, 16, 17, 18, 21], "neg": [8, 14, 15, 16, 18], "when": [8, 13, 14, 16, 17, 18, 23], "zero": [8, 13, 14, 16, 17, 18], "divis": [8, 13, 14, 16, 17, 18], "dict": [8, 13, 14, 15], "dictionari": [8, 13, 14], "kei": [8, 13, 14], "6666666666666666": 8, "omega": 9, "nbin": 9, "let": 9, "": 9, "test": [9, 26], "clip": 9, "local": [9, 24], "metric": [9, 15, 26], "defin": [9, 24], "p": 9, "mate": 9, "higher": [9, 21], "more": [9, 15, 21], "attack": 9, "link": [9, 24], "global": 9, "d_": 9, "sy": 9, "rang": 9, "code": 9, "m": [9, 24], "maouch": 9, "licens": 9, "under": 9, "lgpl": 9, "gomez": 9, "barrero": 9, "galbal": 9, "c": [9, 15, 21], "rathgeb": 9, "busch": 9, "gener": [9, 24], "framework": 9, "unlink": 9, "templat": 9, "protect": [9, 15], "system": [9, 24], "inform": 9, "forens": 9, "secur": 9, "13": 9, "1406": 9, "1420": 9, "2017": 9, "tif": 9, "2788000": 9, "prior": 9, "ratio": 9, "bin": [9, 24, 27], "histogram": 9, "estim": [9, 15, 26], "len": 9, "100": 9, "np": 9, "random": 9, "seed": 9, "10000": 9, "_": 9, "extend": 9, "uniform": 9, "9747999999999999": 9, "3": 9, "absolut": [10, 15], "mae": 10, "n": [10, 11], "sum": [10, 11, 16, 17, 18, 21], "n_": [10, 11], "squar": 11, "mse": 11, "cov": 12, "standard": [12, 15], "deviat": [12, 15], "covari": 12, "8660254037844385": 12, "precis": [13, 15, 16, 17], "recal": [14, 15, 18], "protected_vari": 15, "subgroup": 15, "fscore_per_class": 15, "reduct": 15, "std": 15, "unweight": [15, 16, 17, 18], "bia": 15, "variabl": 15, "measur": 15, "term": 15, "odd": 15, "requir": [15, 23, 24], "classifi": [15, 21], "have": [15, 26], "perform": [15, 26], "independ": 15, "race": 15, "its": 15, "assess": 15, "denot": 15, "diverg": 15, "wai": [15, 24], "well": 15, "For": [15, 26], "serv": 15, "choic": 15, "than": 15, "could": 15, "less": 15, "exhibit": 15, "occur": 15, "femal": 15, "sex": 15, "manifest": 15, "male": 15, "specifi": 15, "direct": 15, "determin": 15, "besid": 15, "_variabl": 15, "alphanumer": 15, "callabl": 15, "typic": 15, "recall_per_class": 15, "precision_per_class": 15, "oper": 15, "lambda": 15, "x": [15, 24], "b": [15, 24], "uaf": 16, "k_": [16, 17, 18], "3333333333333333": 16, "uap": 17, "uar": 18, "util": [20, 23], "It": [20, 24], "gather": 20, "present": 20, "sort": 20, "weight": 21, "appli": 21, "given": 21, "cell": 21, "them": 21, "up": [21, 24], "expect": 21, "costli": 21, "taken": 21, "account": 21, "usual": 21, "case": 21, "diagon": 21, "hold": 21, "correctli": 21, "form": 21, "column": 21, "w_r0_c0": 21, "w_r0_cn": 21, "w_rn_c0": 21, "w_rn_cn": 21, "penal": 21, "word": 22, "string": 22, "north": 22, "wind": 22, "sun": 22, "notabl": 23, "chang": [23, 24], "project": [23, 24], "document": 23, "file": [23, 24], "format": [23, 24], "keep": 23, "adher": 23, "semant": 23, "ad": 23, "argument": 23, "concordance_cc": 23, "support": 23, "python": [23, 24, 27], "12": 23, "speedup": 23, "detection_error_tradeoff": 23, "fix": [23, 24], "avoid": 23, "deprec": 23, "warn": 23, "pkg_resourc": 23, "remov": 23, "7": 23, "linkabl": 23, "pearson_cc": 23, "sphinx": [23, 24], "audeer": [23, 24], "theme": 23, "enforc": 23, "publish": 23, "doc": [23, 24], "split": 23, "api": 23, "sub": 23, "page": [23, 24], "accuraci": 23, "formula": 23, "docstr": 23, "refer": 23, "ccc": 23, "panda": 23, "seri": 23, "datatyp": 23, "int64": 23, "typo": 23, "mean_absolute_error": 23, "infer_label": 23, "equal_error_r": 23, "broken": 23, "due": 23, "__init_": 23, "py": 23, "initi": 23, "public": 23, "releas": 23, "everyon": 24, "invit": 24, "feel": 24, "free": 24, "pull": 24, "request": 24, "you": 24, "find": 24, "omiss": 24, "inconsist": 24, "other": 24, "thing": 24, "need": 24, "improv": 24, "pleas": 24, "issu": 24, "pip": [24, 27], "latest": 24, "pypi": 24, "should": 24, "get": 24, "newest": 24, "version": 24, "github": 24, "git": 24, "clone": 24, "http": 24, "com": 24, "cd": 24, "virtual": [24, 27], "environ": [24, 27], "virtualenv": [24, 27], "python3": [24, 27], "home": [24, 27], "env": [24, 27], "activ": [24, 27], "txt": 24, "your": 24, "alwai": 24, "stai": 24, "date": 24, "even": 24, "repositori": 24, "we": [24, 26], "pep8": 24, "ruff": 24, "linter": 24, "formatt": 24, "addit": 24, "check": 24, "common": 24, "spell": 24, "codespel": 24, "both": 24, "tool": 24, "possibl": 24, "except": 24, "pyproject": 24, "toml": 24, "execut": 24, "ci": 24, "pre": 24, "commit": 24, "enabl": 24, "those": [24, 26], "wide": 24, "afterward": 24, "everi": 24, "time": 24, "call": 24, "directli": 24, "lint": 24, "fixabl": 24, "restrict": 24, "specif": 24, "folder": 24, "make": 24, "re": 24, "html": 24, "few": 24, "necessari": 24, "To": [24, 27], "avail": [24, 26], "directori": 24, "automat": 24, "still": 24, "valid": 24, "linkcheck": 24, "ll": 24, "pytest": 24, "simpli": 24, "made": 24, "step": 24, "updat": 24, "changelog": 24, "rst": 24, "y": 24, "z": 24, "annot": 24, "tag": 24, "push": 24, "sever": 26, "equat": 26, "learn": 26, "some": 26, "sklearn": 26, "want": 26, "depend": 26, "result": 26, "run": 27, "creat": 27}, "objects": {"": [[0, 0, 0, "-", "audmetric"]], "audmetric": [[1, 1, 1, "", "accuracy"], [2, 1, 1, "", "concordance_cc"], [3, 1, 1, "", "confusion_matrix"], [4, 1, 1, "", "detection_error_tradeoff"], [5, 1, 1, "", "edit_distance"], [6, 1, 1, "", "equal_error_rate"], [7, 1, 1, "", "event_error_rate"], [8, 1, 1, "", "fscore_per_class"], [9, 1, 1, "", "linkability"], [10, 1, 1, "", "mean_absolute_error"], [11, 1, 1, "", "mean_squared_error"], [12, 1, 1, "", "pearson_cc"], [13, 1, 1, "", "precision_per_class"], [14, 1, 1, "", "recall_per_class"], [15, 1, 1, "", "unweighted_average_bias"], [16, 1, 1, "", "unweighted_average_fscore"], [17, 1, 1, "", "unweighted_average_precision"], [18, 1, 1, "", "unweighted_average_recall"], [19, 0, 0, "-", "utils"], [21, 1, 1, "", "weighted_confusion_error"], [22, 1, 1, "", "word_error_rate"]], "audmetric.utils": [[20, 1, 1, "", "infer_labels"]]}, "objtypes": {"0": "py:module", "1": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"]}, "titleterms": {"audmetr": [0, 19, 26], "accuraci": 1, "concordance_cc": 2, "confusion_matrix": 3, "detection_error_tradeoff": 4, "edit_dist": 5, "equal_error_r": 6, "event_error_r": 7, "fscore_per_class": 8, "linkabl": 9, "mean_absolute_error": 10, "mean_squared_error": 11, "pearson_cc": 12, "precision_per_class": 13, "recall_per_class": 14, "unweighted_average_bia": 15, "unweighted_average_fscor": 16, "unweighted_average_precis": 17, "unweighted_average_recal": 18, "util": 19, "infer_label": 20, "weighted_confusion_error": 21, "word_error_r": 22, "changelog": 23, "version": 23, "1": 23, "2": 23, "2024": 23, "02": 23, "28": 23, "0": 23, "2023": 23, "05": 23, "08": 23, "6": 23, "01": 23, "03": 23, "5": 23, "4": 23, "2022": 23, "07": 23, "3": 23, "16": 23, "11": 23, "2021": 23, "29": 23, "06": 23, "10": 23, "09": 23, "contribut": 24, "develop": 24, "instal": [24, 27], "code": 24, "convent": 24, "build": 24, "document": 24, "run": 24, "test": 24, "creat": 24, "new": 24, "releas": 24, "index": 25}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinxcontrib.bibtex": 9, "sphinx.ext.viewcode": 1, "sphinx": 57}, "alltitles": {"audmetric": [[0, "module-audmetric"], [26, "audmetric"]], "accuracy()": [[1, "accuracy"]], "concordance_cc()": [[2, "concordance-cc"]], "confusion_matrix()": [[3, "confusion-matrix"]], "detection_error_tradeoff()": [[4, "detection-error-tradeoff"]], "edit_distance()": [[5, "edit-distance"]], "equal_error_rate()": [[6, "equal-error-rate"]], "event_error_rate()": [[7, "event-error-rate"]], "fscore_per_class()": [[8, "fscore-per-class"]], "linkability()": [[9, "linkability"]], "mean_absolute_error()": [[10, "mean-absolute-error"]], "mean_squared_error()": [[11, "mean-squared-error"]], "pearson_cc()": [[12, "pearson-cc"]], "precision_per_class()": [[13, "precision-per-class"]], "recall_per_class()": [[14, "recall-per-class"]], "unweighted_average_bias()": [[15, "unweighted-average-bias"]], "unweighted_average_fscore()": [[16, "unweighted-average-fscore"]], "unweighted_average_precision()": [[17, "unweighted-average-precision"]], "unweighted_average_recall()": [[18, "unweighted-average-recall"]], "audmetric.utils": [[19, "module-audmetric.utils"]], "infer_labels()": [[20, "infer-labels"]], "weighted_confusion_error()": [[21, "weighted-confusion-error"]], "word_error_rate()": [[22, "word-error-rate"]], "Changelog": [[23, "changelog"]], "Version 1.2.1 (2024/02/28)": [[23, "version-1-2-1-2024-02-28"]], "Version 1.2.0 (2023/05/08)": [[23, "version-1-2-0-2023-05-08"]], "Version 1.1.6 (2023/01/03)": [[23, "version-1-1-6-2023-01-03"]], "Version 1.1.5 (2023/01/03)": [[23, "version-1-1-5-2023-01-03"]], "Version 1.1.4 (2022/07/05)": [[23, "version-1-1-4-2022-07-05"]], "Version 1.1.3 (2022/02/16)": [[23, "version-1-1-3-2022-02-16"]], "Version 1.1.2 (2022/01/11)": [[23, "version-1-1-2-2022-01-11"]], "Version 1.1.1 (2022/01/03)": [[23, "version-1-1-1-2022-01-03"]], "Version 1.1.0 (2021/07/29)": [[23, "version-1-1-0-2021-07-29"]], "Version 1.0.1 (2021/06/10)": [[23, "version-1-0-1-2021-06-10"]], "Version 1.0.0 (2021/06/09)": [[23, "version-1-0-0-2021-06-09"]], "Contributing": [[24, "contributing"]], "Development Installation": [[24, "development-installation"]], "Coding Convention": [[24, "coding-convention"]], "Building the Documentation": [[24, "building-the-documentation"]], "Running the Tests": [[24, "running-the-tests"]], "Creating a New Release": [[24, "creating-a-new-release"]], "Index": [[25, "index"]], "Installation": [[27, "installation"]]}, "indexentries": {"audmetric": [[0, "module-audmetric"]], "module": [[0, "module-audmetric"], [19, "module-audmetric.utils"]], "accuracy() (in module audmetric)": [[1, "audmetric.accuracy"]], "concordance_cc() (in module audmetric)": [[2, "audmetric.concordance_cc"]], "confusion_matrix() (in module audmetric)": [[3, "audmetric.confusion_matrix"]], "detection_error_tradeoff() (in module audmetric)": [[4, "audmetric.detection_error_tradeoff"]], "edit_distance() (in module audmetric)": [[5, "audmetric.edit_distance"]], "equal_error_rate() (in module audmetric)": [[6, "audmetric.equal_error_rate"]], "event_error_rate() (in module audmetric)": [[7, "audmetric.event_error_rate"]], "fscore_per_class() (in module audmetric)": [[8, "audmetric.fscore_per_class"]], "linkability() (in module audmetric)": [[9, "audmetric.linkability"]], "mean_absolute_error() (in module audmetric)": [[10, "audmetric.mean_absolute_error"]], "mean_squared_error() (in module audmetric)": [[11, "audmetric.mean_squared_error"]], "pearson_cc() (in module audmetric)": [[12, "audmetric.pearson_cc"]], "precision_per_class() (in module audmetric)": [[13, "audmetric.precision_per_class"]], "recall_per_class() (in module audmetric)": [[14, "audmetric.recall_per_class"]], "unweighted_average_bias() (in module audmetric)": [[15, "audmetric.unweighted_average_bias"]], "unweighted_average_fscore() (in module audmetric)": [[16, "audmetric.unweighted_average_fscore"]], "unweighted_average_precision() (in module audmetric)": [[17, "audmetric.unweighted_average_precision"]], "unweighted_average_recall() (in module audmetric)": [[18, "audmetric.unweighted_average_recall"]], "audmetric.utils": [[19, "module-audmetric.utils"]], "infer_labels() (in module audmetric.utils)": [[20, "audmetric.utils.infer_labels"]], "weighted_confusion_error() (in module audmetric)": [[21, "audmetric.weighted_confusion_error"]], "word_error_rate() (in module audmetric)": [[22, "audmetric.word_error_rate"]]}})
\ No newline at end of file