Comparative Modeling of Pineapple Production Using Gaussian GLM and Random Forest Regression
Abstract
This study aims to conduct a comparative modelling of pineapple production at PT Great Giant Pineapple (GGP) using Gaussian GLM as parametric statistical approach and Random Forest Regression method as machine learning based on monthly data from 2014 to 2022. Multicollinearity testing and distribution fitting were conducted to validate the Gaussian assumption. For the Random Forest Regression, hyperparameters were optimized by tuning the number of trees (ntree) and the number of predictors at each split (mtry) with model stability evaluated using Out-of-Bag (OOB) error. The Gaussian GLM achieved a MAPE of 8.41% (R² = 0.106) for the GP3 clone and 11.27% (R² = 0.149) for the F180 clone. Random Forest Regression produced a testing MAPE of 9.28% (R² = 0.144) for GP3 and 12.11% (R² = 0.105) for F180. While both models achieved low prediction error based on MAPE, they differed in identifying influential variables and showed limited explanatory power as indicated by low R² values. The Gaussian GLM identifies air pressure as significant for both clones and rainfall for F180 clone, while Random Forest consistently identifies rainfall as the most influential predictor. These findings confirm the complementary strengths of parametric and machine learning approaches in supporting climate-based production planning and risk mitigation.
Keywords
References
Kementerian Pertanian Republik Indonesia, Statistik Pertanian 2023. Jakarta, Indonesia:
Pusat Data dan Sistem Informasi Pertanian, 2023.
Badan Pusat Statistik (BPS), Hasil Sensus Pertanian 2023. Jakarta, Indonesia: BPS RI, 2023.
Food and Agriculture Organization (FAO), World Programme for the Census of Agriculture 2020. Rome, Italy: FAO, 2020.
World Bank, “Agriculture, forestry, and fishing, value added (% of GDP) – Indonesia,” 2024. [Online]. Available: https://data.worldbank.org/indicator/NV.AGR.TOTL.ZS?locations=ID
Kementerian Pertanian Republik Indonesia, Outlook Nanas 2024. Jakarta, Indonesia: Pusat Data dan Sistem Informasi Pertanian, 2024.
T. Fahrmeir, T. Kneib, S. Lang, and B. Marx, Regression: Models, Methods and Applications, 2nd ed. Berlin, Germany: Springer, 2021.
P. K. Dunn and G. K. Smyth, Generalized Linear Models With Examples in R, 2nd ed. New York, NY, USA: Springer, 2022.
F. Ceballos-Sierra and S. Dall’Erba, “The effect of climate variability on Colombian coffee productivity: A dynamic panel model approach,” Agricultural Systems, vol. 190, p. 103126, May 2021, Available: https://doi.org/10.1016/j.agsy.2021.103126.
T. F. T. Santos, R. S. B. Silva, and J. M. C. Pereira, “A framework for modelling spatio-temporal trends in crop production using generalised additive models,” Agricultural Systems, vol. 198, 2022, Available: https://doi.org/10.1016/j.agsy.2022.103356
F. Kadir and R. Yunis, “Analisis dampak iklim terhadap produktivitas tanaman pangan dengan model VAR dan GLM,” TAMIKA: Jurnal Tugas Akhir Manajemen Informatika & Komputer Akuntansi, vol. 4, no. 2, pp. 56–63, 2023, Available: https://doi.org/10.46880/tamika.Vol4No2(SEMNASTIK).pp56-63
Breiman, L. (2001). Random forests. Machine Learning, 45(1), 5–32.
James, G., Witten, D., Hastie, T., & Tibshirani, R. (2021). An Introduction to Statistical Learning (2nd ed.). Springer.
A. B. Prakoso, M. A. Putra, M. H. Hilmi, et al., “Penerapan algoritma regresi random forest untuk prediksi produksi jagung menggunakan data statistik sistem pertanian cerdas smart city,” in Prosiding Seminar Nasional Teknologi Informasi dan Bisnis, Jul. 2025, Available: https://doi.org/10.47701/19h5ny78
A. Pratama, E. Hermawan, and S. A. Hudjimartsu, “Identification of potential forest fires using the random forest method in Kubu Raya Regency,” e-Jurnal Penyelidikan dan Inovasi, vol. 12, no. 5, pp. 1–18, Dec. 2025, Available: https://doi.org/10.53840/ejpi.v12i5
Khaidir, Fadhliani, Z. Wirda, and A. Ramadhani, “Model prediksi produksi pertanian berbasis machine learning dan data lapangan,” Sisfo Jurnal Ilmiah Sistem Informasi, vol. 9, no. 2, pp. 172–182, Oct. 2025. [Online]. Available: https://doi.org/10.29103/.v9i2.26015
G. James, D. Witten, T. Hastie, and R. Tibshirani, An Introduction to Statistical Learning: with Applications in R, 2nd ed. New York, NY, USA: Springer, 2021.
A. J. Dobson and A. G. Barnett, An Introduction to Generalized Linear Models, 4th ed. Boca Raton, FL, USA: Chapman & Hall/CRC, 2018.
A. Agresti, Foundations of Linear and Generalized Linear Models. Hoboken, NJ, USA: Wiley, 2015.
J. F. Hair, W. C. Black, B. J. Babin, and R. E. Anderson, Multivariate Data Analysis, 8th ed. Boston, MA, USA: Cengage, 2019.
D. C. Montgomery, E. A. Peck, and G. G. Vining, Introduction to Linear Regression Analysis, 6th ed. Hoboken, NJ, USA: Wiley, 2021.
K. P. Burnham and D. R. Anderson, Model Selection and Multimodel Inference: A Practical Information-Theoretic Approach, 2nd ed. New York, NY, USA: Springer, 2002.
I. G. Andirasdini, D. M. Aliem, and A. Sofia, “Regression models with ARMA errors for predicting tabarru fund in Islamic insurance: A normally distributed simulation approach,” Parameter, vol. 4, no. 2, pp. 239–248. [Online]. Available: https://doi.org/10.30598/parameterv4i2pp239-248
I. G. Andirasdini, D. Saputra, M. Rivai, and S. E. M. Putra, “Analysis of the Health Social Security Administration (BPJS Kesehatan) claim amount using random forest regression,” Indonesian Actuarial Journal, vol. 1, no. 1, pp. 1–8, 2025. [Online]. Available: https://doi.org/10.65689/iajvol01no1pp001-008
S. Fachid and A. Triayudi, “Perbandingan algoritma regresi linier dan regresi random forest dalam memprediksi kasus positif Covid-19,” Jurnal Media Informatika Budidarma, vol. 6, no. 1, pp. 68–73, Jan. 2022. [Online]. Available: https://doi.org/10.30865/mib.v6i1.3492
S. L. M. Sitio, Machine Learning Berbasis Pohon Keputusan: Implementasi Decision Tree dan Random Forest di Google Colab. Cilacap, Indonesia: PT Media Pustaka Indo, 2026.
A. R. Hakim et al., “Implementation of random forest algorithm on palm oil price,” Journal Tech-E, vol. 6, no. 2, pp. 34–42, 2023. [Online]. Available: https://doi.org/10.31253/te.v6i2.1757
E. A. Omotoye and B. S. Rotimi, “Stationarity in Prophet model forecast: Performance evaluation approach,” American Journal of Theoretical and Applied Statistics, vol. 14, no. 3, pp. 109–117, 2025. [Online]. Available: https://doi.org/10.11648/j.ajtas.20251403.12
T. Hastie, R. Tibshirani, and J. Friedman, The Elements of Statistical Learning, 2nd ed. New York, NY, USA: Springer, 2009.
J. Cohen, P. Cohen, S. G. West, and L. S. Aiken, Applied Multiple Regression/Correlation Analysis for the Behavioral Sciences, 3rd ed. Mahwah, NJ, USA: Lawrence Erlbaum Associates, 2003.
D. Chicco, M. J. Warrens, and G. Jurman, “The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation,” PeerJ Computer Science, vol. 7, 2021, Available: https://doi.org/10.7717/peerj-cs.623
L. Chen, P. W. Gamage, and J. Ryan, “Debias random forest regression predictors,” Journal of Statistical Research, vol. 56, no. 2, pp. 115–131, Jul. 2023, Available: https://doi.org/10.3329/jsr.v56i2.67466
Q. Zhang, X. Zhao, H. Han, F. Yang, S. Pan, Z. Liu, K. Wang, and C. Zhao, “Maize yield prediction using federated random forest,” Computers and Electronics in Agriculture, vol. 210, p. 107930, Jul. 2023, Available: https://doi.org/10.1016/j.compag.2023.107930
E. Asamoah, G. B. M. Heuvelink, I. Chairi, P. S. Bindraban, and V. Logah, “Random forest machine learning for maize yield and agronomic efficiency prediction in Ghana,” Heliyon, vol. 10, no. 20, 2024, Available: https://doi.org/10.1016/j.heliyon.2024.e37065
M. Kuradusenge, F. Ndayambaje, and A. Hirwa, “Crop yield prediction using machine learning models,” Agriculture, vol. 13, no. 1, 2023, Avalaible: https://doi.org/10.3390/agriculture13010225
DOI: http://dx.doi.org/10.30829/zero.v10i1.28721
Refbacks
- There are currently no refbacks.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Publisher : Department of Mathematics Faculty of Science and Technology Universitas Islam Negeri Sumatera Utara Medan | ||||
| ||||
![]() | | | ![]() | |


