Skip to content

Instantly share code, notes, and snippets.

@fabclmnt
Created March 9, 2021 00:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabclmnt/01a88adc36fbe68250a3c98d43cfe341 to your computer and use it in GitHub Desktop.
Save fabclmnt/01a88adc36fbe68250a3c98d43cfe341 to your computer and use it in GitHub Desktop.
WGAN_GP synthetic fraud
from ydata_synthetic.synthesizers.regular import WGAN_GP
noise_dim = 32
dim = 128
batch_size = 164
log_step = 100
epochs = 1000+1
learning_rate = 5e-4
beta_1 = 0.5
beta_2 = 0.9
models_dir = './cache'
gan_args = [batch_size, learning_rate, beta_1, beta_2, noise_dim, fraud.shape[1]-1, dim]
train_args = ['', epochs, log_step]
fraud_synth = WGAN_GP(gan_args, n_critic=2)
fraud_synth.train(fraud.drop('y', axis=1), train_args)
synthetic_fraud = fraud_synth.sample(400)
synthetic_fraud.columns = fraud.drop('y', axis=1).columns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment