ydataai / ydata-synthetic

Synthetic data generators for tabular and time-series data
https://docs.synthetic.ydata.ai
MIT License
1.45k stars 236 forks source link

How can I save the data generated by timeGAN? #322

Open AnthonyFang623 opened 10 months ago

AnthonyFang623 commented 10 months ago

Hi, I refer to the code template in the example to train my own data using the timeGAN model, and it worked perfectly. Thanks for the hard working that makes it easy for us to use the TimeGAN model.

But I have encountered one problem, I don't know how to save the generated data.

Because at the begining, there is a parameter seq_len = 24 # Timesteps . The original shape of my csv file is (3000, 7), column: date, T1, T2, ... , T6. After begining, the shape became (2976, 24, 6), when i use .to_csv, the shape didn't match.

I know the shape change is from shift sampling every 24 lines, how can I aggregate the generated data in the original shape (3000,7), column: date, T1, T2, ... , T6, and save it as csv file?

JiaSong1997 commented 5 months ago

Have you solved the problem?