This paper compared and analyzed machine learning models suitable for intrusion detection systems (IDS) using the CICIDS2017 dataset. Four models—a multilayer perceptron (MLP), a one-dimensional convolutional neural network (CNN), an one-class support vector machine (OCSVM), and a local outlier factor (LOF)—were evaluated in two scenarios: detecting existing attacks and generalizing to unknown threats. Supervised learning-based MLP and CNN achieved near-perfect accuracy for existing attacks, but significantly reduced recall for new attacks. Unsupervised learning-based LOF achieved moderate overall accuracy but high recall for unknown threats, but suffered from a high false alarm rate. OCSVM achieved the best balance of precision and recall, demonstrating robust detection performance in both scenarios.