snorkel.slicing.PandasSFApplier¶
-
class
snorkel.slicing.PandasSFApplier(lfs)[source]¶ Bases:
snorkel.labeling.apply.pandas.PandasLFApplierSF applier for a Pandas DataFrame.
See
snorkel.labeling.core.PandasLFApplierfor details.-
__init__(lfs)[source]¶ Initialize self. See help(type(self)) for accurate signature.
- Return type
None
Methods
__init__(lfs)Initialize self.
apply(df[, progress_bar, fault_tolerant, …])Label Pandas DataFrame of data points with LFs.
-
apply(df, progress_bar=True, fault_tolerant=False, return_meta=False)[source]¶ Label Pandas DataFrame of data points with LFs.
- Parameters
df (
DataFrame) – Pandas DataFrame containing data points 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
-