Abstract: In this letter, a machine learning-based algorithm, K-nearest neighbor, is employed to predict the actual patterns of the linear arrays with arbitrary positions and varied element numbers.