sdv-dev / SDV

Synthetic data generation for tabular data
https://docs.sdv.dev/sdv
Other
2.31k stars 304 forks source link

Synthetic data from PARSynthesizer does not follow original data distribution #2230

Open PaudGS opened 1 week ago

PaudGS commented 1 week ago

Environment details

If you are already running SDV, please indicate the following details about the environment in which you are running it:

Problem description

Trying to create synthetic numeric values using PARSynthesizer returns values very close to the mean of the original distribution, with little variance between values. The data is a simple table consisting of patient_id(sequence_id), mesure_id, measure_date_time(sequence key) and value of measurement.

The histograms of both distributions look like this: image

What I already tried

I have tried different epoch values, running with a larger input dataset and the different RDT transforms. Running the same data with the GaussianCopulaSynthesizer yields much better results, but I would lose the time series aspect of the original data.

Is this the expected behaviour of the PARSynthesizer or am I doing something wrong?

srinify commented 1 week ago

Hi @PaudGS 👋

At the moment, our single table and multi table synthesizers are definitely a bit more mature than PARSynthesizer, our sequential synthesizer. So this difference alone might be causing the shortcoming you're experiencing unfortunately, especially if you've already experimented with different epochs and different transformers.

To rule out a few more things, it would be helpful if you could share your metadata, the column(s) you care the most about, and maybe some sample values that represent the rough distribution (e.g. you can take your original values but scale them by a factor to add a layer of fuzziness). Oh, and also some more context into your use case in general!

This way, I can try to replicate the same distributions on my end, then suggest any possible improvements, and if needed we can document the shortcomings you encountered in a new issue for the team!

PaudGS commented 4 days ago

Hi @srinify, Thanks for the quick response. About the use case, I am working with data of measurements (blood pressure, heart rate, respiratory rate...) on hospitalized patients. We are looking for ways to automatize the creation of synthetic patients and model their health evolution through hospital stay. For privacy concerns I have attached manually curated synthetic data of blood pressure measurements instead of the original data, but the results are similar with both datasets. metadata.json data.csv

Thanks in advance!