Solar Purchase Volume Prediction Using The K-Nearest Neighbor Algorithm Based On Backward Elimination - Prasetyo, Aries Alfian; Pramono, Yudi; Ulfiyah, Laily; Fattah, Misbakhul (Yayasan Cita Cendekiawan Al Khwarizmi, 2024)
The profit earned by a Public Filling Station or gas station comes from the purchase of fuel per period and sales in accordance with the volume amount. So the exact purchase volume will determine the turnover of each month. But the profit or turnover is often irregular, there are several causes such as the price of fuel that tends to change, the volume of orders that are not in accordance with consumer demand. With these prediction methods, the expected turnover is increased with more efficient purchases. This research was conducted to study about k-NN Algorithm and then apply k-NN Algorithm in data prediction. The data used are secondary data in the form of data on the number of purchases of BBM in volume liter in the period January 2012 - December 2024. The k values used are k = 1, K = 4, k = 5 and k = 7. Before calculation with k = 1 is done, determined the data of training and data testing, in this research determined as much 70% training data and 30% for data testing. Then the initial cluster determination of the training data based on the interval class. While the cluster in the data testing is determined based on testing with K = 4, k = 5 and k = 7. From the process of analysis and evaluation of the research predicted the volume of fuel purchases using the data ransed dataset that processed data into multivariate data, the process of analysis using K-NN method using 2,3,4 and 5 periods produce the smallest K located in the period to 3, so that the 3rd period will be predicted by K-NN based backward elimination. With the aim of finding the best method to predict the volume of fuel purchases, generate predictions with backward elimination, that the attribute weights in the period xt - 3 and in the period xt 1 selected as the reference in the prediction process, since the weight is 1. K = 13 is the K best way to perform the Analyzing process with K-NN for the prediction of fuel purchase volume, with K = 4 value of 45556,788. So in the analysis and prediction of oil fuel purchasing volume data, for the type of diesel, K is best K = 13 with K-NN analysis method with backward elimination process. The above results show that xt3 or week 3 and week xt1 to 1 in the last period of 2024 can be used as a reference in the purchase in the next year that is 2025.