snorkel.augmentation.transformation_function¶
-
class
snorkel.augmentation.
transformation_function
(name=None, pre=None, memoize=False, memoize_key=None)[source]¶ Bases:
snorkel.map.core.lambda_mapper
Decorate functions to create TFs.
See
snorkel.map.core.lambda_mapper
for details.Example
>>> @transformation_function() ... def square(x): ... x.num = x.num ** 2 ... return x >>> from types import SimpleNamespace >>> square(SimpleNamespace(num=2)) namespace(num=4)
-
__init__
(name=None, pre=None, memoize=False, memoize_key=None)[source]¶ Initialize self. See help(type(self)) for accurate signature.
- Return type
None
Methods
__init__
([name, pre, memoize, memoize_key])Initialize self.
-