← Latest papers
📊 statistics

Comparison of Machine Learning Methods for Monthly Rainfall Forecasting Using k-Nearest Neighbors, Random Forest, and Artificial Neural Networks

This study compares k-Nearest Neighbors, Random Forest, and Artificial Neural Networks for monthly rainfall forecasting in Pangkalpinang and finds that Random Forest outperforms the other two algorithms based on evaluation metrics like MAE, RMSE, and R².

Original authors: Mico Maulana, Giarno

Published 2026-10-29
📖 4 min read☕ Coffee break read

Original authors: Mico Maulana, Giarno

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Rainfall is the heartbeat of the climate system, a force that shapes everything from the food on our tables to the safety of our cities. It is a vital resource for farmers and a potential hazard when it arrives in excess, yet predicting exactly how much will fall in a given month remains one of the most difficult challenges in meteorology. Unlike the steady flow of a river or the predictable rise of the tide, rain is chaotic and highly nonlinear, meaning it does not follow simple, straight-line patterns. In tropical regions like Indonesia, where the weather is driven by a complex mix of ocean currents, monsoons, and local geography, this unpredictability is even more pronounced. To make sense of this chaos, scientists have turned to machine learning, a branch of computer science where algorithms learn from historical data to find hidden patterns. These digital tools do not rely on rigid rules but instead study thousands of past weather observations to guess what might happen next, offering a new way to tackle the age-old problem of forecasting rain.

In a recent study focused on the Depati Amir Meteorological Station in Pangkalpinang, researchers set out to see which of three popular machine learning methods works best for predicting monthly rainfall. The team, led by Mico Maulana and Giarno from the State College of Meteorology Climatology and Geophysics, gathered ten years of weather data, spanning from 2015 to 2024. They looked at a variety of factors that influence rain, including the amount of rain that fell in previous months, the average air temperature, how humid the air was, and how long the sun shone each day. Using this information, they trained three different types of computer models: one that looks for similar past weather patterns, one that builds a crowd of decision-making trees to vote on the outcome, and one that mimics the way a human brain processes information through layers of connections. The goal was not to invent a new way of predicting rain, but to compare these existing tools to see which one could most accurately forecast the weather in this specific tropical archipelago.

The researchers split their data into two parts, using the first eight years to teach the models and the final two years to test them. They then measured the results using standard tools that check how close the predictions were to the actual rain that fell. The findings revealed a clear winner. The model that built a crowd of decision trees, known as Random Forest, proved to be the most effective. It managed to explain about 60 percent of the changes in monthly rainfall, producing predictions that were, on average, off by about 76 millimeters. This model was particularly good at capturing the ups and downs of the wet and dry seasons without getting confused by extreme weather events. In contrast, the model that mimics the brain, called an Artificial Neural Network, struggled the most. It explained only about 30 percent of the rainfall variability and made significantly larger errors, often guessing too high during heavy rains and too low during dry spells. The third model, which simply looked for similar past weather patterns, performed in the middle, explaining roughly 49 percent of the variability but tending to smooth out the peaks and valleys of the data, missing some of the most intense rain events.

The study suggests that for this specific region and type of data, the approach that combines many simple decision-makers into a single, robust system is superior to the other methods tested. The researchers noted that the neural network likely struggled because the dataset, while valuable, was relatively small for such a complex system to learn from effectively. The decision-tree-based model, however, thrived by averaging the results of many individual trees, which helped it avoid overreacting to the noise in the data and provided a more stable forecast. While no model is perfect, and the best result still left room for error, the study provides a practical roadmap for meteorologists in tropical island regions. It indicates that when working with limited historical records, an ensemble method that aggregates many simple views of the data is more reliable than trying to force a complex brain-like system to work with a smaller amount of information. This insight helps refine the tools used to protect communities and manage resources in areas where the rain is as unpredictable as it is essential.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →