Comparative Analysis Of Rainfall Value Prediction In Semarang Using Linear And K-Nearest Neighbor Algorithms
Bagus Setya, Rizqy Agung Nurhidayatullah, Maria Beliti Hewen, Kusrini Kusrini · 2023
Indonesia has a tropical climate with erratic weather changes. It is necessary to conduct a study to predict rainfall as decision-making on weather information that will occur in the future. Rainfall is one of the factors that cause changes in weather in an area. This research was conducted on the climate in Semarang which is part of the Central Java region with geographical and topographical conditions in the form of mountains and lowlands which cause changes in rainfall. Variables that are used as parameters and affect rainfall are temperature, humidity, wind speed and length of sunlight. These variables are processed using data from BMKG Semarang. The data were analyzed in this study to find out the comparison of research results with pre-existing data. The research was conducted using Multiple Linear Regression and K-Nearest Neighbor comparison algorithms by making the rainfall data the dependent variable and other parameters as independent variables. This study uses climate data from the BMKG Semarang Station for the period January 2021 to June 2023. The evaluation was carried out with the aim of estimating the magnitude of the prediction error value for total rainfall per month against observational data for total rainfall for that month so that rainfall levels can be predicted in the next six months. Realization of the actual rainfall data is 17.89, the amount of actual data is compared with the results of the evaluation using the Linear Regression equation the MAE acquisition value is 16.59 and calculations using the K-NN algorithm MAE = 18.75.