Orion icon indicating copy to clipboard operation
Orion copied to clipboard

TadGAN window size, detect & score_anomalies methods

Open Moneera opened this issue 2 years ago • 1 comments

  • Orion version: 0.3.2
  • Python version: 3.6
  • Operating System: Windows

First Question:

I am trying to run TadGAN window size to a different value rather than the default value (100), but I am facing the following Exception whenever I do that:

ValueError: Negative dimension size caused by subtracting 5 from 4 for 'model_3/sequential_3/conv1d_2/convolution' (op: 'Conv2D') with input shapes: [?,1,4,64], [1,5,64,64].

From what I understood from previous discussions that the window size is constant value, is there any possibility to update TadGAN regarding this matter? That would be really helpful.

Second Question:

I used the detect method to see the anomalies that TadGAN produced after the training. I noticed that it always shows me 5 anomalies at max, even when I tried it on different datasets. Is it possible to show more than that? Is there a threshold or a parameter in detect method that I am unaware of, that I can change to show more anomalies?

Third Question:

I want to use score_anomalies method, but it is unclear for me, since it requires multiple parameters. I already saw the example provided in https://sintel.dev/, but it is still not clear for me. Can you please give me an example for this method, explaining each parameter and its use? Thank you in advance!

Your support is valuable to us.

Moneera avatar Sep 15 '22 06:09 Moneera

Hi @Moneera! Thank you for using Orion!

Q1

Can you give a bit more detail on the setup? The following code works for me, let me know if it works for you!

 hyperparameters = {
     "mlprimitives.custom.timeseries_preprocessing.rolling_window_sequences#1": {
         "window_size": 100
     },
     'orion.primitives.tadgan.TadGAN#1': {
         'epochs': 5,
         'verbose': True
     }
 }
 
 orion = Orion(
     pipeline='tadgan_gpu',
     hyperparameters=hyperparameters
 )

Q2

Definitely! the constant 5 anomalies among different datasets is a pure coincidence. There are multiple hyperparameters that you can toggle to view more/less anomalies. Take a look at the documentation of the primitive find_anomalies.

Q3

score_anomalies primitive is typically used for the output of TadGAN primitive. It requires four inputs, the details can be found here.

The Tulog notebook might be helpful to understand the primitives and give more insight on the hyperparameters.

sarahmish avatar Sep 15 '22 17:09 sarahmish