K-Nearest Neighbor (KNN) Algorithm to Determine the Stock of Building Material Store Materials - Safitri, Delilla; Fakhriza, Muhammad (Journal of Computer System and Informatics (JoSYC), 2024)
In recent months, a lot of infrastructure has been built, resulting in a shortage of goods in the warehouse due to increased demand for consumer goods and some goods not being sold. Such was the case in January and February 2024 when Riko Jaya panglong experienced a shortage of sand and cement supplies, causing losses. This makes it difficult to predict the inventory of an item in the warehouse. Inventory of goods has great strategic importance for the company. This prediction is very useful in determining the amount of goods to be shipped in the following month. Therefore, companies must implement proactive inventory management. The K-Nearest Neighbor algorithm which looks at the ecluiden distance between old cases and is compared with new cases in an effort to recognize supervised data or data that already exists and has been recorded to help make decisions on the latest cases, this algorithm is very widely applied in other studies because this algorithm has very simple steps and logical reasoning processes by producing the right data and decisions. This data is processed to determine the classification of goods whether increasing or decreasing. And the K-NN algorithm with a value of k = 3 is used to predict stock items. The test results show that K-NN can provide accurate predictions by calculating the Euclidean distance between testing data and training data. The prediction accuracy obtained from the Confusion Matrix reached 100%, indicating the high reliability of this model. Implementation of the K-NN algorithm in RapidMiner with cross-validation technique resulted in a performance of 71.43% for decreasing classification and 67.57% for increasing classification, showing the efficiency of the algorithm in classifying stock data.