Comparison of LSTM and Random Forest for Hydrogen Production Prediction in Alkaline Water Electrolysis - Ulil Amri Ulil; Ardi Pujiyanta; Sunardi Sunardi (Journal of Applied Informatics and Computing, 2026)
Hydrogen has emerged as a promising clean energy carrier capable of supporting the transition toward sustainable energy systems. In alkaline water electrolysis systems, accurate prediction of hydrogen production is essential for improving system monitoring, operational efficiency, and future control strategies. This study aims to compare the performance of Random Forest (RF) and Long Short-Term Memory (LSTM) algorithms in predicting hydrogen production based on operational parameters of an alkaline water electrolysis system. The dataset used in this study consists of more than 100,000 operational data samples collected from laboratory-scale electrolysis experiments, including voltage, current, temperature, and hydrogen gas pressure measurements. Hydrogen production was calculated using the ideal gas law and used as the target variable for model development. Prior to model training, the dataset underwent preprocessing, including data cleaning, normalization, and train-test splitting. The predictive performance of both models was evaluated using Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and coefficient of determination (R²). Experimental results show that the Random Forest model achieved superior performance with an MAE of 0.0085, RMSE of 0.0106, and R² of 0.9905, while the LSTM model obtained an MAE of 0.0302, RMSE of 0.0361, and R² of 0.7907. The findings indicate that Random Forest is more effective than LSTM in modeling the relationship between operational parameters and hydrogen production in the investigated alkaline water electrolysis system. This study demonstrates the potential of machine learning approaches for accurate hydrogen production prediction and provides insights into the suitability of different predictive models for electrolysis-based hydrogen generation systems.