TGAN icon indicating copy to clipboard operation
TGAN copied to clipboard

Fixing random seed to reproduce the same results

Open kveerama opened this issue 4 years ago • 2 comments

A question about your TGAN code. We need to avoid any randomness for reproducibility purposes. We were wondering if there is a way to avoid this? We have tried to set the random seed, but it seems like there is randomness involved somewhere that we can not control over. We will appreciate your response.

kveerama avatar Aug 02 '20 21:08 kveerama

From @leix28 The randomness comes from the data transformation

https://github.com/sdv-dev/TGAN/blob/master/tgan/data.py#L239.

TGAN fits Gaussian Mixture models (GMM) on all continuous columns and transforms those columns. We use the GMM implementation in sklearn. To eliminate all randomness, you can implement the save and load function in MultiModalNumberTransformer to fix the transformation.

kveerama avatar Aug 02 '20 21:08 kveerama

Hi, we tried to fix the random seed here in GaussianMixtureModel but still there's randomness. Also, could you explain more about how to "implement the save and load function in MultiModalNumberTransformer to fix the transformation"? Thanks for your time.

zihaohe123 avatar Aug 07 '20 03:08 zihaohe123