In this study, we submit a complex set of in-situ data collected by optical emission spectroscopy (OES) during the process of aluminum nitride (AlN) thin film. Changing the sputtering power and nitrogen(N2) flow rate, AlN film was deposited on Si substrate using a superior sputtering with a pulsed direct current (DC) method. The correlation between OES data and deposited film residual stress (tensile vs. compressive) associated with crystalline status by X-ray diffraction spectroscopy (XRD), scanning electron microscope (SEM), and transmission electron microscope (TEM) measurements were investigated and established throughout the machine learning exercise. An important answer to know is whether the stress of the processing film is compressive or tensile. To answer this question, we can access as many optical spectra data as we need, record the data to generate a library, and exploit principal component analysis (PCA) to reduce complexity from complex data. After preprocessing through PCA, we demonstrated that we could apply standard artificial neural networks (ANNs), and we could obtain a machine learning classification method to distinguish the stress types of the AlN thin films obtained by analyzing XRD results and correlating with TEM microstructures. Combining PCA with ANNs, an accurate method for in-situ stress prediction and classification was created to solve the semiconductor process problems related to film property on deposited films more efficiently. Therefore, methods for machine learning-assisted classification can be further extended and applied to other semiconductors or related research of interest in the future.