> For the complete documentation index, see [llms.txt](https://docs.sdv.dev/sdv/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sdv.dev/sdv/~/changes/T3ZD1DOoRUEqkmrAGBZp/multi-table-data/sampling.md).

# Sampling

Use these sampling methods to create synthetic data from your multi table model.&#x20;

## Sample Realistic Data

Create realistic synthetic data data that follows the same format and mathematical properties as the real data.

### sample

Use this function to create synthetic data that mimics the real data

```python
synthetic_data = synthesizer.sample(
    scale=1.5
)
```

**Parameters**

* `scale`: A float >0.0 that describes how much to scale the data by

<table data-header-hidden><thead><tr><th width="157"></th><th></th></tr></thead><tbody><tr><td>(default) <code>1</code></td><td>Don't scale the data. The model will create synthetic data that is roughly the same size as the original data.</td></tr><tr><td><code>>1</code></td><td>Scale the data by the specified factor. For example, <code>2.5</code> will create synthetic data that is roughly  2.5x the size of the original data.</td></tr><tr><td><code>&#x3C;1</code></td><td>Shrink the data by the specified pecentage. For example, <code>0.9</code> will create synthetic data that is roughtly 90% of the size of the original data.</td></tr></tbody></table>

**Returns** A dictionary that maps each table name (string) to a [pandas DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) object with synthetic data for that table. The synthetic data mimics the real data.

{% hint style="info" %}
**How large will the synthetic data be?** The scale is based on the size of the data you used for training. The scale determines the size of every parent table (ie a table without any foreign keys).

Note that the synthesizer will algorithmically determine the size of the child tables, so their final sizes will approximately follow the scale, with some minor deviations.
{% endhint %}

### reset\_sampling

Use this function to reset any randomization in sampling. After calling this, your synthesizer will generate the same data as before. For example in the code below, `synthetic_data1` and `synthetic_data2` are the same.

```python
synthesizer.reset_sampling()
synthetic_data1 = synthesizer.sample(scale=1.5)

synthesizer.reset_sampling()
synthetic_data2 = synthesizer.sample(scale=1.5)
```

**Parameters** None

**Returns** None. Resets the synthesizer.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sdv.dev/sdv/~/changes/T3ZD1DOoRUEqkmrAGBZp/multi-table-data/sampling.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
