Random Survival Forest for Time-to-Maturity Prediction in Black Soldier Fly

  • ROZALINA AMRAN Institut Teknologi Bacharuddin Jusuf Habibie
  • Muhammad Syafaat Institut Teknologi Bacharuddin Jusuf Habibie
  • Andi Taufiqurrahman Akbar Institut Teknologi Bacharuddin Jusuf Habibie
  • Aulia Handayani Tahir Institut Teknologi Bacharuddin Jusuf Habibie
Keywords: Black soldier fly, Machine learning, Random Survival Forest, Right-censoring, Time-to-Transition

Abstract

Black soldier fly (BSF, Hermetia illucens) larvae are widely used to biologically convert organic waste into value-added biomass, but the time required to reach maturity varies with rearing temperature, humidity, and feed intake, which complicates harvest scheduling. This study developed and evaluated a Random Survival Forest (RSF) model to predict the time-to-transition to the adult (‘Dewasa’) stage of BSF under right-censoring, using temperature, humidity, feed consumption, larval count, and larval weight as covariates, on a monitoring dataset of 8,000 observations (28.1% events, 71.9% censored) over a 30-day rearing period. As groundwork, regression and classification benchmarks were also trained; Random Forest and Gradient Boosting explained most of the variance in total biomass (R² = 0.9998) and feed conversion ratio (R² = 0.929–0.938) and achieved near-perfect phase classification (accuracy 0.9999), results interpreted cautiously given likely redundancy between predictors and these outcomes. In contrast, the RSF model itself achieved a Harrell and Uno C-index of 0.490, an Integrated Brier Score of 0.213, and a mean time-dependent AUC of 0.489, indicating discrimination and calibration close to chance despite permutation importance detecting statistically distinguishable contributions from humidity, larval count, and temperature. These findings show that, within the observed range of rearing conditions, environmental and feeding covariates carried only marginal information about maturation timing beyond what is captured by elapsed rearing day, and they motivate wider covariate ranges, multistate transition modelling, and additional substrate covariates before an RSF-based decision-support tool for circular organic waste management can be recommended for operational use

References

Alagappan, S., Hoffman, L., & Cozzolino, D. (2026). Modelling black soldier fly larvae growth performance based on chemical composition and rearing conditions---A machine learning approach. Waste and Biomass Valorization. https://doi.org/10.1007/s12649-026-03541-y

Belperio, S., Cattaneo, A., Nannoni, E., Sardi, L., Martelli, G., Dabbou, S., & Meneguz, M. (2024). Assessing substrate utilization and bioconversion efficiency of black soldier fly (Hermetia illucens) larvae: Effect of diet composition on growth and development temperature. Animals, 14(9), 1340. https://doi.org/10.3390/ani14091340

Berkowitz, M., Altman, R. M., & Loughin, T. M. (2024). Random forests for survival data: Which methods work best and under what conditions? The International Journal of Biostatistics, 20(2), 315–345. https://doi.org/10.1515/ijb-2023-0056

Cardoso, L., Angelo, S. A., Bonilha, Y. P. G., Maia, F., Ribeiro, A., Curado, M., Fernandes, G., Parro, V., Cipparrone, F., Filho, A. C., & Toporcov, T. (2025). Methodology for Comparing Machine Learning Algorithms for Survival Analysis. ArXiv, abs/2510.24473. https://doi.org/10.48550/arxiv.2510.24473

Gärttling, D., & Schulz, H. (2022). Compilation of black soldier fly frass analyses. Journal of Soil Science and Plant Nutrition, 22, 937–943. https://doi.org/10.1007/s42729-021-00703-w

Harrell, F. E., Lee, K. L., & Mark, D. B. (1996). Multivariable prognostic models: Issues in developing models, evaluating assumptions and adequacy, and measuring and reducing errors. Statistics in Medicine, 15(4), 361–387.

Herremans, M., Wylant, B., Shumo, M., Shoo, A., James, M., Ngalesoni, F., Ndjovu, A., Mbuligwe, S., & Yhedgo, M. (2023). Advancing circular economy principles through wild black soldier flies. AIMS Environmental Science, 10(6), 868–893. https://doi.org/10.3934/environsci.2023047

Ishwaran, H., Kogalur, U. B., Blackstone, E. H., & Lauer, M. S. (2008). Random survival forests. The Annals of Applied Statistics, 2(3), 841–860. https://doi.org/10.1214/08-AOAS169

Jaeger, B. C., Welden, S., Lenoir, K., Speiser, J. L., Segar, M. W., Pandey, A., & Pajewski, N. M. (2024). Accelerated and interpretable oblique random survival forests. Journal of Computational and Graphical Statistics, 33(1), 192–207. https://doi.org/10.1080/10618600.2023.2231048

Kullan, A. R. K., Suresh, A., Choi, H. L., Neumann, E. G., & Hassan, F. (2024). Bioconversion of poultry litter into insect meal and organic frasstilizer using black soldier fly larvae as a circular economy model for the poultry industry: A review. Insects, 16(1), 12. https://doi.org/10.3390/insects16010012

Lalander, C., Diener, S., Zurbrügg, C., & Vinnerås, B. (2019). Effects of feedstock on larval development and process efficiency in waste treatment with black soldier fly (Hermetia illucens). Journal of Cleaner Production, 208, 211–219. https://doi.org/10.1016/j.jclepro.2018.10.017

Liu, Y., Zhou, S., Wei, H., & An, S. (2021). A comparative study of forest methods for time-to-event data: Variable selection and predictive performance. BMC Medical Research Methodology, 21, 193. https://doi.org/10.1186/s12874-021-01386-8

Muinde, J., Tanga, C. M., Olukuru, J., Odhiambo, C., Tonnang, H. E. Z., & Senagi, K. (2023). Application of machine learning techniques to discern optimal rearing conditions for improved black soldier fly farming. Insects, 14(5), 479. https://doi.org/10.3390/insects14050479

Pickett, K. L., Suresh, K., Campbell, K. R., Davis, S., & Juarez-Colunga, E. (2021). Random survival forests for dynamic predictions of a time-to-event outcome using a longitudinal biomarker. BMC Medical Research Methodology, 21, 216. https://doi.org/10.1186/s12874-021-01375-x

Pölsterl, S. (2020). scikit-survival: A Library for Time-to-Event Analysis Built on Top of scikit-learn. J. Mach. Learn. Res., 21, 212:1-212:6.

Senevirathne, D. M., Yang, S.-I., Brandeis, C., & Hodges, D. G. (2024). Predicting time-to-harvest in mixed-species forests using a random survival forest algorithm. Forest Ecosystems, 11, 100236. https://doi.org/10.1016/j.fecs.2024.100236

Shumo, M., Khamis, F. M., Tanga, C. M., Fiaboe, K. K. M., Subramanian, S., Ekesi, S., van Huis, A., & Borgemeister, C. (2019). Influence of temperature on selected life-history traits of black soldier fly (Hermetia illucens) reared on two common urban organic waste streams in Kenya. Animals, 9(3), 79. https://doi.org/10.3390/ani9030079

Surendra, K. C., Tomberlin, J. K., van Huis, A., Cammack, J. A., Heckmann, L.-H. L., & Khanal, S. K. (2020). Rethinking organic wastes bioconversion: Evaluating the potential of the black soldier fly (Hermetia illucens (L.)) (Diptera: Stratiomyidae) (BSF). Waste Management, 117, 58–80. https://doi.org/10.1016/j.wasman.2020.07.050

Tomberlin, J. K., Adler, P. H., & Myers, H. M. (2009). Development of the black soldier fly (Diptera: Stratiomyidae) in relation to temperature. Environmental Entomology, 38(3), 930–934. https://doi.org/10.1603/022.038.0347

Uno, H., Cai, T., Pencina, M. J., D’Agostino, R. B., & Wei, L. J. (2011). On the C-statistics for evaluating overall adequacy of risk prediction procedures with censored survival data. Statistics in Medicine, 30(10), 1105–1117. https://doi.org/10.1002/sim.4154

Wang, P., Li, Y., & Reddy, C. K. (2019). Machine learning for survival analysis: A survey. ACM Computing Surveys, 51(6), 1–36. https://doi.org/10.1145/3214306

Published
2026-10-30
Abstract viewed = 19 times
PDF downloaded = 14 times