Closed chaotianshinaida closed 9 months ago
Hi @chaotianshinaida
I'm not sure if that is still the case. I think if you put your target column in the last column, then it should work. We take the last colume by default for the classifier/regressor.
And for where we defined the regressor, actually we still call it "classifier" in the paper, check this line of code: https://github.com/Team-TUD/CTAB-GAN-Plus/blob/ab07d3f1a3bd41ccdf72f9fef73ce3c704a9368d/model/synthesizer/ctabgan_synthesizer.py#L30 there is where when we have regression problem, we modified the last layer of the "classifier" to make it output only a number. We don't apply softmax in the logits anymore.
Would you have a try and tell me if that works for you?
Best,
Zilong
my target column in the last column now but it still report error like this. how to deal with this problem?
categorical_columns = [], log_columns = [], mixed_columns= {}, non_categorical_columns= [] general_columns= ['A','B','C','D','E'] integer_columns = ['R','F'] problem_type= {"Regression": "N"] YOU SEE,This is the part of the input data that I modified
This is an example in github, it doesn't work either
![Uploading QQ截图20231210112659.png…]()
Hi @chaotianshinaida
I have push a fix for this. https://github.com/Team-TUD/CTAB-GAN-Plus/commit/f7451c77a5c72fe59c99d816847ced28df2037a8 you can just modify one line to make it work.
Thank you very much for your answer, now the code works
Hello author, I am very happy that I used CTAB-GAN+ to generate a set of data. But there may still be some unresolved problems in the code that evaluates the data later.If you are free, I hope you can help me take a look
Traceback (most recent call last):
File "E:\keyan\生成对抗神经网络\CTAB_GANP\CTAB-GAN-Plus-main\suanfaregression.py", line 32, in
I want to export the training set and test set. Which part of the code is this? And can your code modify the division ratio of the training set and the test set?
Hi @chaotianshinaida
Sorry it takes some times to get back to you, I was quite busy last few days. Please check the new updates, it should fix all your bugs. It was a mistake, I didn't update the evaluation code for this repo for the regression dataset evaluation. Thanks for pointing out that.
Best,
Zilong
Thank you I will try again
I want to know can CTAB-GAN+ generate data . Question1 The first column of my data is determined by the last thirteen columns.My data are all continuous data.When I input it into GTAN-GAN+ according to the king file, the program reports an error: ValueError: The least populated class in y has only 1 member, which is too few. The minimum number of groups for any class cannot be less than 2.
Question2:Where in the code can you see that CTAB-GAN+ can solve not only classification problems but also regression problems? I hope to get your reply, it's really important to me