PSO-LSTM for Optimum Fertilizer Level Forecasting with NPK Virtual Sensors
Automated fertilization is an important part of smart farming that increases nutrient absorption based on plant needs, which aligns with precision agriculture. However, a research gap exists to improve the ability to control nutrients to prevent environmental pollution. Our research aim is to apply PSO to optimize LSTM training in performing fertilization-level forecasting. We utilize a secondary dataset from Kaggle that contains features such as soil moisture, light levels, and air temperature. Our first task is to create a virtual sensor for sodium, phosphorus, and potassium (NPK) based on the available information. We compare several models, such as random forest, gradient boosting, decision tree, and k-nearest neighbor (KNN). The next step is to perform LSTM training for forecasting. We compare PSO and grid search for the most optimal hyperparameter tuning for the LSTM model. Some of the metrics we use are root mean squared error (RMSE), mean absolute error (MAE), and r-squared (R2). The test results show that in terms of accuracy and recall, random forest outperforms the other three methods for NPK virtual sensor classification with values of 0.74 and 0.76, respectively. Then, the precision and f1-score values of the random forest are the only ones among the four models with values above 0.70. Further, PSO shows that LSTM hyperparameter tuning involves a vast and continuous search space due to the wide range of possible parameter values. Finally, LSTM with PSO optimization has better RMSE, MAE, and R2 than LSTM with grid search optimization values of 1.2, 0.4, and 0.8, respectively.
Authors
- Muhammad Faris Fathoni
- Aji Gautama Putrada (ORCID: https://orcid.org/0000-0001-8677-0177)
- Abd Rahman Dzaky
Institutions
- Telkom University (ID)
Publication Details
- Published
- 2024-12-11
- DOI
- https://doi.org/10.1109/isriti64779.2024.10963540
- Citations
- 5
- Primary Topic
- Smart Agriculture and AI
- Type
- article
- Field-Weighted Citation Impact
- 3.00