microsoft / anomalydetector

SR-CNN
MIT License
257 stars 70 forks source link

question about the data generation #8

Open dagap opened 4 years ago

dagap commented 4 years ago

Thank you sharing the code. I was trying to understand the code around the synthetic data generation.

Can you kindly elaborate on what these lines are doing:

 if (self.win_siz - 6) not in ids:
        self.control += np.random.random()
 else:
        self.control = 0
 if self.control > 100:
        ids[0] = self.win_siz - 6
        self.control = 0

In particular,I am puzzled by what they achieve and the role of the control variable. Could you kindly elaborate on what is happening with this code?