snorkel.slicing.SFApplier¶
-
class
snorkel.slicing.SFApplier(lfs)[source]¶ Bases:
snorkel.labeling.apply.core.LFApplierSF applier for a list of data points.
See
snorkel.labeling.core.LFApplierfor details.-
__init__(lfs)[source]¶ Initialize self. See help(type(self)) for accurate signature.
- Return type
None
Methods
__init__(lfs)Initialize self.
apply(data_points[, progress_bar, …])Label list of data points or a NumPy array with LFs.
-
apply(data_points, progress_bar=True, fault_tolerant=False, return_meta=False)[source]¶ Label list of data points or a NumPy array with LFs.
- Parameters
data_points (
Union[Sequence[Any],ndarray]) – List of data points or NumPy array to be labeled by LFsprogress_bar (
bool) – Display a progress bar?fault_tolerant (
bool) – Output-1if LF execution fails?return_meta (
bool) – Return metadata from apply call?
- Return type
Union[ndarray,Tuple[ndarray,ApplierMetadata]]- Returns
np.ndarray – Matrix of labels emitted by LFs
ApplierMetadata – Metadata, such as fault counts, for the apply call
-