LiDan456 / GAN-AD

We used generative adversarial networks (GANs) to do anomaly detection for time series data.
143 stars 50 forks source link

GP() argument after ** must be a mapping #1

Open CreamyR opened 5 years ago

CreamyR commented 5 years ago

When i run the "RGAN.py",there's an error said " samples, pdf = GP(data_options, kernel='rbf') TypeError: GP() argument after must be a mapping, not NoneType".

While if i run the "data_utils.py",process finished with no wrong. So,i want to know how to deal with the issue.Thanks very much.

1

2

ngovanmao commented 5 years ago

you can modify the RGAN with the following code:

diff --git a/RGAN.py b/RGAN.py
index 2c514e1..7ef8afb 100644
--- a/RGAN.py
+++ b/RGAN.py
@@ -27,7 +27,7 @@ if settings['settings_file']: settings = utils.load_settings_from_file(settings)
 # --- get data, split --- #
 # samples, pdf, labels = data_utils.get_samples_and_labels(settings)

-samples, pdf, labels = data_utils.get_data(settings['data'], settings['seq_length'], settings['seq_step'], settings['num_signals'])
+samples, pdf, labels = data_utils.get_data(settings['data'], settings['seq_length'], settings['seq_step'], settings['num_signals'], settings)

 # --- training sample --- #
 # --- save settings, data --- #

It will run OK.