Skip to content

Commit

Permalink
chore: fix running examples (#272)
Browse files Browse the repository at this point in the history
* chore: fix examples.

* chore: udt ctgan training epochs
  • Loading branch information
fabclmnt authored May 23, 2023
1 parent 5c94e91 commit 2f6fd89
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 8 deletions.
3 changes: 1 addition & 2 deletions examples/regular/models/creditcard_cgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
'V3', 'V22', 'V6', 'V20', 'V27', 'V16', 'V13', 'V25', 'V24', 'V18', 'V2', 'V1', 'V5', 'V15',
'V9', 'V23', 'Class']
processed_data = data[ sorted_cols ].copy()
processed_data['Class'] = processed_data['Class'].apply(lambda x: 1 if x == "'1'" else 0)

#For the purpose of this example we will only synthesize the minority class
train_data = processed_data.loc[processed_data['Class'] == 1].copy()
Expand All @@ -47,7 +46,7 @@
beta_2 = 0.9

log_step = 100
epochs = 500 + 1
epochs = 2 + 1
learning_rate = 5e-4
models_dir = '../cache'

Expand Down
3 changes: 1 addition & 2 deletions examples/regular/models/creditcard_cramergan.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
print('Dataset columns: {}'.format(num_cols))
sorted_cols = ['V14', 'V4', 'V10', 'V17', 'V12', 'V26', 'Amount', 'V21', 'V8', 'V11', 'V7', 'V28', 'V19', 'V3', 'V22', 'V6', 'V20', 'V27', 'V16', 'V13', 'V25', 'V24', 'V18', 'V2', 'V1', 'V5', 'V15', 'V9', 'V23', 'Class']
processed_data = data[ sorted_cols ].copy()
processed_data['Class'] = processed_data['Class'].apply(lambda x: 1 if x == "'1'" else 0)

#For the purpose of this example we will only synthesize the minority class
train_data = processed_data.loc[processed_data['Class'] == 1].copy()
Expand All @@ -45,7 +44,7 @@
batch_size = 128

log_step = 100
epochs = 2+1
epochs = 500+1
learning_rate = 5e-4
beta_1 = 0.5
beta_2 = 0.9
Expand Down
1 change: 0 additions & 1 deletion examples/regular/models/creditcard_ctgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
'V3', 'V22', 'V6', 'V20', 'V27', 'V16', 'V13', 'V25', 'V24', 'V18', 'V2', 'V1', 'V5', 'V15',
'V9', 'V23', 'Class']
processed_data = data[ sorted_cols ].copy()
processed_data['Class'] = processed_data['Class'].apply(lambda x: 1 if x == "'1'" else 0)

# For the purpose of this example we will only synthesize the minority class
train_data = processed_data.loc[processed_data['Class'] == 1].copy()
Expand Down
1 change: 0 additions & 1 deletion examples/regular/models/creditcard_cwgangp.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
print('Dataset columns: {}'.format(num_cols))
sorted_cols = ['V14', 'V4', 'V10', 'V17', 'V12', 'V26', 'Amount', 'V21', 'V8', 'V11', 'V7', 'V28', 'V19', 'V3', 'V22', 'V6', 'V20', 'V27', 'V16', 'V13', 'V25', 'V24', 'V18', 'V2', 'V1', 'V5', 'V15', 'V9', 'V23', 'Class']
processed_data = data[ sorted_cols ].copy()
processed_data['Class'] = processed_data['Class'].apply(lambda x: 1 if x == "'1'" else 0)

#For the purpose of this example we will only synthesize the minority class
train_data = processed_data.loc[processed_data['Class'] == 1].copy()
Expand Down
3 changes: 1 addition & 2 deletions examples/regular/models/creditcard_wgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
print('Dataset columns: {}'.format(num_cols))
sorted_cols = ['V14', 'V4', 'V10', 'V17', 'V12', 'V26', 'Amount', 'V21', 'V8', 'V11', 'V7', 'V28', 'V19', 'V3', 'V22', 'V6', 'V20', 'V27', 'V16', 'V13', 'V25', 'V24', 'V18', 'V2', 'V1', 'V5', 'V15', 'V9', 'V23', 'Class']
processed_data = data[ sorted_cols ].copy()
processed_data['Class'] = processed_data['Class'].apply(lambda x: 1 if x == "'1'" else 0)

#For the purpose of this example we will only synthesize the minority class
train_data = processed_data.loc[processed_data['Class'] == 1].copy()
Expand All @@ -41,7 +40,7 @@
batch_size = 128

log_step = 100
epochs = 300+1
epochs = 500+1
learning_rate = 5e-4
beta_1 = 0.5
beta_2 = 0.9
Expand Down

0 comments on commit 2f6fd89

Please sign in to comment.