Temperature, Humidity, and Weather Prediction Using Random Forest and LSTM for Food Crop Cultivation Optimization in Tegal

Authors

  • Sarwo Edi Department of Informatioan Technology, Universitas Stikubank, Indonesia
  • Aji Supriyanto Department of Informatioan Technology, Universitas Stikubank, Indonesia

DOI:

https://doi.org/10.52465/joiser.v4i3.10

Keywords:

Temperature Humidity Index, Classification, Random Forest, LSTM, Food crops

Abstract

The agricultural sector in the Tegal region faces uncertain climate fluctuations that directly impact food crop productivity. A crucial indicator for determining plant environmental comfort is the Temperature Humidity Index (THI). This research aims to develop a hybrid model capable of predicting and classifying future THI values to support precision decision-making for farmers. The methodology utilized historical climate data including Temperature humidity, rainfall, sunshine, and wind speed from the Tegal Maritime Meteorology Station spanning a 10-year period (2016-2025). A Long Short-Term Memory (LSTM) model was applied to forecast future THI values, while a Random Forest (RF) model was utilized to classify plant stress categories. Model performance was evaluated using Root Mean Square Error (RMSE), Accuracy, and F1-score. The results indicate that Tegal experiences comfortable (24 ≤ THI < 27), moderately comfortable (27 ≤ THI < 30), and uncomfortable (THI ≥ 30) conditions, particularly during dry and transitional seasons. The LSTM model achieved a 98.42% prediction accuracy, and the RF model reached a 99.59% classification accuracy. In conclusion, this highly accurate model can serve as an early warning system, providing farmers with actionable recommendations for optimal planting schedules and stress mitigation.

Author Biography

  • Sarwo Edi, Department of Informatioan Technology, Universitas Stikubank, Indonesia

    Ijin mengirimkan jurnal, mohon untuk di review

Downloads

Published

2026-08-06

Issue

Section

Articles