For the complete documentation index, see llms.txt. This page is also available as Markdown.

❖ Range Extrapolation

❖ SDV Enterprise Bundle. This feature is available as part of the Targeted Sampling bundle, an optional add-on to SDV Enterprise. For more information, please visit the Targeted Sampling page.

By default, your synthesizers learns the patterns based on the training data you provide, including the possible ranges within each column. The range extrapolation feature allows you to create synthetic data that is outside the ranges of your training data.

Usage

This feature is meant for extrapolating outside of the ranges that your training data contains. This covers:

  • Extrapolating the possible min and max for continuous attributes like numerical or datetime columns

  • Creating brand new category values that were not present in your original training data

  • Allowing null (or non-null) values in a column even when your training data doesn't have this scenario covered

Specify Ranges in the Metadata

Make sure that your metadata object contains the full ranges that you want to specify. This includes the min/max values of ranges, full lists of category values, and more.

For more information, see the Metadata API.

Use Your Synthesizer as Usual

The range extrapolation will automatically be applied when you create a synthesizer with the metadata.

from sdv.multi_table import HSASynthesizer

synthesizer = HSASynthesizer(metadata)

What's Next?

Be sure to fit your syntheizer for the extrapolation to work.

After fitting, you can sample synthetic data as usual. The synthetic data will now contain the full ranges that you specified in your dictionary as opposed to the ranges from the training data.

Note that you may need to sample many data points in order to see the extrapolated values. Alternatively, you can request the extrapolated values explicitly. For example, say your training data only included users aged 25-60 but your range extrapolation extends the ranges from 18-100. You can then request synthesizing any age between 18 and 100.

For more information, see the API docs for conditional sampling.

Last updated