Forecasting Analysis of Heavy Metal Concentrations in the Ciliwung River Using Random Forest and Xgboost Methods
This study utilizes Random Forest and XGBoost algorithms to forecast heavy metal (Pb, Cd, Hg) concentrations in the Ciliwung River for 2024–2030, finding that XGBoost offers superior predictive accuracy and projecting that while levels will remain within Indonesia's Government Regulation No. 22 of 2021 Class II standards, continued monitoring is essential as Cd and Pb approach threshold limits.
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
Rivers are the arteries of a city, carrying life, waste, and the invisible traces of human industry. In the bustling heart of Jakarta, the Ciliwung River flows from the highlands through dense neighborhoods and industrial zones before reaching the sea. For decades, scientists have known that this waterway carries heavy metals—poisonous elements like lead, cadmium, and mercury that do not break down and can accumulate in the food chain. These contaminants come from factories, vehicle emissions, and household waste, posing a silent threat to both the ecosystem and the people who rely on the river. Traditionally, checking for these poisons has been a slow, expensive process requiring scientists to collect water samples and send them to a laboratory for chemical analysis. While accurate, this method is reactive; it tells us what happened yesterday, not what might happen tomorrow. As cities grow and climate patterns shift, there is a pressing need to understand where these pollutants are heading, allowing managers to act before water quality becomes dangerous.
A team of researchers from universities in Indonesia, the United Kingdom, and Malaysia has taken a new approach to this challenge. Instead of waiting for lab results, they used computer programs designed to learn from past data to predict the future state of the Ciliwung River. They focused on three specific heavy metals: lead, cadmium, and mercury. To do this, they gathered historical records of water quality from 2015 to 2023, looking at factors that influence pollution, such as the acidity of the water and the amount of organic waste and suspended particles. They then fed this information into two powerful types of computer learning systems. One system, known as Random Forest, works by building many simple decision trees and averaging their answers. The other, called XGBoost, is a more advanced method that builds trees one after another, with each new tree learning from the mistakes of the previous ones to refine the prediction. The goal was to see which system could better forecast the levels of toxic metals in the river from 2024 through 2030.
The results showed that the more advanced system, XGBoost, was the superior predictor. It consistently made smaller errors and captured the complex patterns of pollution better than its counterpart. Using this best-performing model, the researchers projected the concentration of heavy metals for the next several years. They estimated that lead levels would range between 14.285 and 19.483 micrograms per liter, cadmium between 7.413 and 9.998 micrograms per liter, and mercury between 0.227 and 0.457 micrograms per liter. When these numbers were compared against the safety limits set by the Indonesian government for water used in recreation and fish farming, the projections offered a cautious sense of relief. All the predicted values remained below the legal thresholds. However, the study also revealed a concerning nuance. While the levels were safe, the amount of cadmium was predicted to hover very close to the maximum allowable limit, suggesting that the river is operating with a very narrow margin of safety.
The researchers were careful to explain that these numbers are not guarantees of future safety, but rather educated estimates based on current trends. The model did not account for sudden changes, such as a massive new industrial discharge or an unusual weather event that could wash more pollutants into the river. The computer program learned from the past, so if the future looks like the past, the prediction holds; if the future changes drastically, the model may not catch it. This is why the authors emphasize that their work should not replace traditional lab testing. Instead, it serves as an early warning system. It allows officials to see potential risks before they become emergencies, helping them decide where to focus their monitoring efforts and when to tighten regulations.
The study highlights a shift in how we manage our environment. For years, river management has been a game of reaction, cleaning up pollution after it has already caused damage. This new approach suggests a future where we can anticipate problems. By using data to forecast trends, city planners and environmental agencies can move from simply reacting to crises to preventing them. The research confirms that while the Ciliwung River currently meets safety standards, the pressure from urban life is constant. The levels of lead and cadmium are trending in a way that requires vigilance. If the sources of pollution are not controlled, the river could quickly cross the line from safe to dangerous. The work serves as a reminder that keeping a river clean is not just about cleaning up what is already there, but about understanding the invisible forces that push pollutants into the water, and using every tool available, from chemistry to computer science, to protect the health of the city and its people.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.