High stock price volatility in Indonesia's infrastructure and energy sectors poses challenges in predicting price movements. This study aims to implement and compare the accuracy of K-Nearest Neighbors (KNN) machine learning model and Long Short-Term Memory (LSTM) deep learning model in predicting stock prices in these sectors. The research stages include data preprocessing, model training, eva…