Anomaly-based DDoS attack detection by using sparse coding and frequency domain