Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final Year Project - issues running CWGAN on other datasets. #14

Open
femurray opened this issue Mar 21, 2022 · 2 comments
Open

Final Year Project - issues running CWGAN on other datasets. #14

femurray opened this issue Mar 21, 2022 · 2 comments

Comments

@femurray
Copy link

femurray commented Mar 21, 2022

I am doing a final year project for my undergrad degree on Tabular GANs, and am hoping to do a comparative review (specifically regarding the use of tabular GANs on imbalanced data) as part of it.

So I am trying to use this GAN on 3 datasets. I am running into issues running all of them, and I'm not sure why. The issue for each is unique, i.e. if 1 dataset has an issue, the other 2 datasets don't trigger the issue and none of the datasets on this repo trigger these errors either. Would you have any insight into why these errors are occurring and be able to help me rectify them? The dataset sources are below.

creditcard: https://www.kaggle.com/mlg-ulb/creditcardfraud
pendigits: https://archive.ics.uci.edu/ml/datasets/Pen-Based+Recognition+of+Handwritten+Digits
intrusion: https://archive.ics.uci.edu/ml/datasets/kdd+cup+1999+data

I will include the error for each as comments here.

@femurray
Copy link
Author

pendigits error:

Traceback (most recent call last):

File "C:\Users\ferga\AppData\Local\Temp/ipykernel_21824/1028949086.py", line 59, in
gan.fit(X_train_trans, y=y_train.values,

File "C:\Users\ferga\Documents\College\FYP\python\cWGAN\models.py", line 313, in fit
self.train(X=X_tens, y=y_tens, batch_size=batch_size, n_iters=n_iters, y_train=y_train)

File "C:\Users\ferga\Documents\College\FYP\python\cWGAN\models.py", line 328, in train
self._pretrain_aux_classifier(X=X, y=y)

File "C:\Users\ferga\Documents\College\FYP\python\cWGAN\models.py", line 161, in _pretrain_aux_classifier
f'AUC: {roc_auc_score(y[:, -1], preds):.4f} '

File "C:\Users\ferga\anaconda3\lib\site-packages\sklearn\utils\validation.py", line 63, in inner_f
return f(*args, **kwargs)

File "C:\Users\ferga\anaconda3\lib\site-packages\sklearn\metrics_ranking.py", line 536, in roc_auc_score
raise ValueError("multi_class must be in ('ovo', 'ovr')")

ValueError: multi_class must be in ('ovo', 'ovr')

@justinengelmann
Copy link
Owner

Hi, just saw this. The error you posted is due to your dataset having 10 classes, but the code is only setup for binary problems at the moment. In principle it can be adapted for multi-class but that would be a fair bit of effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants