Implementation:Sdv dev SDV BaseMultiTableSynthesizer Fit
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Machine_Learning, Synthetic_Data |
| Last Updated | 2026-02-14 00:00 GMT |
Overview
Concrete tool for fitting a multi-table synthesizer on relational data, provided by the SDV library.
Description
The BaseMultiTableSynthesizer.fit method is the training entry point for multi-table synthesizers. It validates input data, preprocesses each table, then calls fit_processed_data which triggers table augmentation and per-table model fitting.
Usage
Call this method on an HMASynthesizer with a dictionary of DataFrames.
Code Reference
Source Location
- Repository: SDV
- File: sdv/multi_table/base.py
- Lines: L641-677
Signature
def fit(self, data):
"""Fit this model to the original data.
Args:
data (dict):
Dictionary mapping each table name to a pandas.DataFrame.
"""
Import
from sdv.multi_table import HMASynthesizer
# fit is called as: synthesizer.fit(data)
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| data | dict[str, pd.DataFrame] | Yes | Dictionary mapping table names to DataFrames |
Outputs
| Name | Type | Description |
|---|---|---|
| (mutates self) | None | Sets self._fitted = True; augments and fits per-table models |
Usage Examples
from sdv.datasets.demo import download_demo
from sdv.multi_table import HMASynthesizer
data, metadata = download_demo(modality='multi_table', dataset_name='fake_hotels')
synthesizer = HMASynthesizer(metadata)
synthesizer.fit(data)
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment