INNER CODE UNIT · Python
_MatrixSufficientStatistics
linzhiqiu/t2v_metrics · dataset.py:23
def _MatrixSufficientStatistics(
x,
y,
epsilon: float,
) -> Tuple[int, int, int, int, int]:
"""Calculates tau sufficient statistics using matrices in NumPy.
An absolute difference less than `epsilon` in x pairs is considered to be
a tie.
Args:
x: Vector of numeric values.
y: Vector of numeric values.
epsilon: The threshold for which an absolute difference in x scores should
be considered a tie.
Returns:
The number of concordant pairs, discordant pairs, pairs tied only in x,