ydataai / ydata-synthetic

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

[BUG] Creating synthetic data via CGAN #331

Open Feinster opened 3 months ago

Feinster commented 3 months ago

Describe the bug I tried to create synthetic data with CGAN, but an exception is thrown. I tried running your example file and the same error occurs.

  File "D:\Program Files\JetBrains\PyCharm 2023.3.4\plugins\python\helpers\pydev\pydevd.py", line 1534, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "D:\Program Files\JetBrains\PyCharm 2023.3.4\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "D:\Users\Matteo\Documents\GitHub\Artificial-Intelligence-Applications-for-Healthcare\prova.py", line 69, in <module>
    synth = RegularSynthesizer(modelname='cgan', model_parameters=gan_args)
  File "C:\Users\matte\AppData\Roaming\Python\Python310\site-packages\ydata_synthetic\synthesizers\regular\model.py", line 56, in __new__
    model=Model(modelname).function(model_parameters, **kwargs)
  File "C:\Users\matte\AppData\Roaming\Python\Python310\site-packages\ydata_synthetic\synthesizers\regular\cgan\model.py", line 32, in __init__
    super().__init__(model_parameters)
TypeError: object.__init__() takes exactly one argument (the instance to initialize)

To Reproduce Run the file https://github.com/ydataai/ydata-synthetic/blob/dev/examples/regular/models/creditcard_cgan.py (the dataset link is no longer available, download it locally)

Desktop (please complete the following information):