compute_midrank

Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.

compute_midrank(x: ndarray) → ndarray[source]

Compute midranks (average ranks for tied values).

Parameters:

x – One-dimensional array of scores.

Returns:

Array of midranks, 1-based to match the AUC formula in the paper.