Time series anomaly detection using generative adversarial networks