flippers.overlaps#

flippers.overlaps(L)#

Calculate the number of fraction of labeled samples labeled by other labeling functions for each labeling function.

Parameters:

L (pd.DataFrame) – Weak label DataFrame of shape (n_samples, n_weak).

Returns:

Series of length n_weak indicating the fraction of annotated samples with other annotations for each LF.

Return type:

pd.Series

Example

>>> L = pd.DataFrame([[0, 1, 0], [1, 0, 1], [0, 0, 0], [1, 1, 1]])
>>> flippers.overlap(L)
0    0.50
1    0.25
2    0.50
dtype: float64