Design, Implementation, and Validation of a Self-Learning Intrusion Detection System