WGAN_GP synthetic fraud
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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