Resilient machine learning methods for cyber-attack detection