A game-theoretic approach for selecting optimal time-dependent thresholds for anomaly detection