Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Snorkel team Snorkel Transformation Function Definition

From Leeroopedia
Knowledge Sources
Domains Data_Augmentation, Data_Programming
Last Updated 2026-02-14 20:00 GMT

Overview

A mechanism for defining data transformation operations that generate augmented training examples by modifying existing data points.

Description

Transformation Function Definition extends the data programming paradigm to data augmentation. A transformation function (TF) takes a data point and returns either a modified version of it (creating an augmented example) or None (indicating the transformation was not applicable).

Unlike labeling functions which produce labels, TFs produce new data points. They share the same Mapper infrastructure, supporting:

  • Field mapping and renaming
  • Preprocessor chains
  • Result caching (memoization)
  • Deep copy of data points to avoid mutation

TFs can implement any data modification: text paraphrasing, synonym replacement, random insertion/deletion, image transformations, etc.

Usage

Use this principle when you want to programmatically augment your training data. Define TFs that create meaningful variations of your data while preserving labels. Combine multiple TFs through augmentation policies.

Theoretical Basis

A transformation function τj maps data points to modified versions:

τj:𝒳𝒳{}

where (None) indicates the transformation was not applicable. The augmented dataset is:

𝒟aug=𝒟{(τj(xi),yi):τj(xi)}

The label is preserved since the transformation should not change the semantic class.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment