flippers.total_coverage#
- flippers.total_coverage(L)#
Calculate the total proportion of labeled samples in the given label matrix.
- Parameters:
L (pd.DataFrame) – Weak label DataFrame of shape (n_samples, n_weak).
- Returns:
Total coverage, ranging from 0 to 1, indicating the proportion of labeled samples in the label matrix.
- Return type:
float
Example
>>> L = pd.DataFrame([[0, 1, 0], [1, 0, 1], [0, 0, 0], [1, 1, 1]]) >>> flippers.total_coverage(L) 0.75