flippers.is_labeled#

flippers.is_labeled(L)#

Check if any labels exist in the given label matrix L.

Parameters:

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

Return type:

Series of size n_samples indicating whether a sample is labeled or not.

Example

>>> L = pd.DataFrame([[0, 1, 0], [1, 0, 1], [0, 0, 0], [1, 1, 1]])
>>> flippers.is_labeled(L)
0     True
1     True
2    False
3     True
dtype: bool