0

i have generated the new data using ctgan but it creates in same day as in dataset (13-09-2022 and 14-09-2022). I want the dates previous days(like 12-09-2022,11-09-2022...) ,can anyone help thank you in advance

from ctgan import CTGAN
ctgan = CTGAN(verbose=True)

ctgan.fit(data, categorical_features, epochs = 100)
samples = ctgan.sample(10)
output-     visit_date  token_no    patient_booking_time    
0   2022-09-14  260 11:01   
1   2022-09-13  237 10:00   
2   2022-09-13  511 08:51   
3   2022-09-14  145 09:00   
Corralien
  • 109,409
  • 8
  • 28
  • 52
saad
  • 1
  • 2
  • Make a list of the possible dates and pick one at random from your list. – rossum Feb 15 '23 at 08:44
  • To expand @rossum's suggestion: pandas `data_range` might be helpful for you: https://pandas.pydata.org/docs/reference/api/pandas.date_range.html – Vojta F Feb 15 '23 at 10:09

0 Answers0