Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Principle:Sdv dev SDV Constraint Integration

From Leeroopedia
Knowledge Sources
Domains Data_Quality, Synthetic_Data
Last Updated 2026-02-14 00:00 GMT

Overview

A registration mechanism that attaches constraint objects to a synthesizer, enabling constraint-aware data transformation during fitting and sampling.

Description

Constraint integration bridges the gap between constraint definition and synthesizer execution. When constraints are added to a synthesizer, the system determines whether each constraint can be enforced through data transformation (chained constraints) or must use reject sampling (reject-sampling constraints). Chained constraints modify the data before model fitting and reverse the modification after sampling. Reject-sampling constraints filter invalid rows from generated data.

Usage

Call add_constraints on a synthesizer with a list of constraint objects before calling fit.

Theoretical Basis

  1. Constraint classification: Each constraint attempts to update the metadata; if successful, it becomes a chained constraint; if it raises ConstraintNotMetError, it falls back to reject sampling
  2. Chained constraints: Transform data before fitting, reverse-transform after sampling
  3. Reject-sampling constraints: Filter invalid rows after sampling, with batch retries

Related Pages

Implemented By

Page Connections

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