Journal of Researches in Mechanics of Agricultural Machinery

Journal of Researches in Mechanics of Agricultural Machinery

Machine Learning-Based Prediction of Tragacanth Gum Viscosity using Optical Features

Document Type : Research Paper

Authors
1 Assistant professor, Agricultural Engineering Research Department, Isfahan Agricultural and Natural Resources Research and Education Center.
2 Researcher of Technical Engineering Department of Isfahan Agricultural Research Center
3 Scientific member of technical engineering department of Isfahan agricultural research center
4 PhD Graduated, Biosystem Engineering, College of Agriculture, Isfahan University of Technology
Abstract
Introduction
Tragacanth gum is one of the most valuable natural gums, widely used for its renewability, availability, cost-effectiveness, hypoallergenicity, non-carcinogenicity, and non-toxicity. Its applications span wastewater treatment, extending the shelf-life of agricultural and food products, and various hygienic and pharmaceutical industries (Boamah et al., 2023; Anon, 2006). Statistics indicate that Iran accounts for approximately 70% of the world’s tragacanth gum exports (Qomshi Bozorg et al., 2012). Generally, tragacanth gum is classified into two major types (ribbon and flake), which exhibit distinct physical and rheological properties. Key determinants of tragacanth gum quality and commercial value include aqueous solution viscosity, color indices, and microbial load (Abasi & Rahimi, 2006). A critical technological challenge in the export, grading, and processing of tragacanth gum is the development of a rapid, accurate, cost-effective, and non-destructive method for measuring the viscosity of its gels. In this study, a novel approach is proposed for estimating tragacanth gum viscosity, using the optical properties of the samples as input and machine learning algorithms for modeling. To address the problem, five regression-based modeling techniques, including multiple linear regression (MLR), partial least square regression (PLSR), support vector regression (SVR), standard Lasso regression, and cross-validated Lasso regression, were applied to predict viscosity from optical data. By comparing their performance and prediction accuracy, the best model for estimating tragacanth gum viscosity based on optical features was identified.
Material and Methods
This study employed an experimental design to evaluate the feasibility of predicting the viscosity of tragacanth gum gel using optical properties and machine learning. A total of 36 gum samples from two commercially available grades (strip and flake) were analyzed. Optical color indices (L*, a*, b*) were measured using a calibrated colorimeter (Lutron RGB-1002). Gum gels were prepared according to standard protocols, and their viscosities were measured with Brookfield DV_II viscometer. All samples were prepared under identical conditions to ensure consistency. A machine learning approach was used to develop predictive models for viscosity determination. MLR, PLSR, SVR, Lasso, and LassoCV models were developed, trained, and tested in Python. Model performance was evaluated using R², RMSE, and MAE with k-fold cross-validation to minimize overfitting and ensure replicability.
Results and Discussion
- Initial Data Pattern Analysis: To examine the initial patterns and possible relationships between the input variables (optical and physical features) and the output variable (viscosity), the variations in viscosity with respect to each of the measured features were analyzed. As observed, there is a clear distinction in viscosity between the two gum types (ribbon and flake); ribbon-type samples generally exhibit higher viscosity, whereas flake-type samples tend to have lower viscosity. Among the optical features, the L*, a*, and b* parameters exhibit distinct patterns of scatter with respect to viscosity.
- Evaluation of Machine Learning Models: The results of evaluating the performance of different models in predicting the viscosity of tragacanth gum showed that the Lasso regression model provided the highest accuracy compared to the other models. This model demonstrated superior predictive capability for viscosity.
-Residual Plot Analysis: Ideally, residuals should be randomly scattered around the zero axis (y= 0), with no systematic patterns or clustering. In this dataset, due to the nature of the samples, the outputs belong to two distinct types of tragacanth gum with separate numerical ranges. One type has low viscosity values (200 to 500 cP), while the other shows high viscosity values (2000 to 3000 cP), and there are no data points in the intermediate range.
A closer look at the Lasso residual plot shows that the residuals mostly fluctuate within a narrow range around zero and exhibit a more random pattern than those of the other models. This indicates that the Lasso model has achieved a better balance between variance and bias.
Analysis of Predicted vs. Actual Value Plots: These plots are essential tools for assessing model fit, as the closer the points lie to the diagonal reference line (y = x), the higher the model accuracy and the smaller the difference between actual and predicted values. In the plots of all models, an upward trend near the reference line can be observed, indicating that all five models can predict the output values. However, differences in point density and the degree of dispersion around the reference line distinguish the accuracy and stability of each model.
The Lasso and LassoCV models exhibit the best agreement between actual and predicted values. In these two models, most points align very closely with the reference line, indicating high correlation and low prediction error.
Conclusions
This research showed that using machine learning and exploiting the optical properties of various types of tragacanth gum enables the determination of its viscosity quickly, at low cost, and with high accuracy. In this study, five linear regression models MLR, Lasso, LassoCV, and PLSR and one nonlinear regression model, SVR, were compared.
The Lasso model, due to its superior statistical indices, high consistency of points around the reference line (lower error), and minimal dispersion in the residual plots, was identified as the most stable and accurate model among all the methods examined. This confirms the Lasso model's high efficiency and reliability in predicting complex, multidimensional data. Moreover, in this model, applying the L1 penalty to the coefficients effectively eliminated one of the features, reducing dimensionality and yielding a lighter, more interpretable model. Overall, the results indicated that the Lasso model outperformed the other models in terms of statistical metrics (R², RMSE, MAE), residual distribution, and prediction accuracy and speed, making it an optimal choice for non-destructive viscosity estimation. Given the practical nature of this research and its strong potential for application in the production and trade industry of tragacanth gum, it is recommended that future research develop a model capable of automatically determining viscosity values through direct image processing of tragacanth samples.
Keywords
Subjects

Abbasi, S. & Rahimi, S. (2006). Investigating the effect of concentration, temperature, viscosity and rotation speed on the flow behavior of Iranian Tragacanth gum solution. Iranian Journal of Food Sciences and Industries, 2(4): (in Persian). https://fsct.modares.ac.ir.
 
Anon. (2001). Tragacanth Gum. Metals and arsenic specifications revised at the 57th JECFA. https://cybercolloids.net/information/technical-articles/tragacanth-gum-jecfa-specification/
 
 
Balaghi, S., Mohammadifar, M., & Zargaraan, A. (2010). Physicochemical and rheological characterization of gum tragacanth exudates from six species of Iranian Astragalus. Food Biophysics, 5(1), 59e71. DOI: 10.1007/s11483-009-9144-5
 
Barak, S., Mudgil, D., & Taneja, S. (2020). Exudate gums: Chemistry, properties and food applications–a review. Journal of the Science of Food and Agriculture, 100(7), 2828–2835. DOI: 10.1002/jsfa.10302
 
Boamah, P. O., Afoakwah, N. A., Onumah, J., Osei, E. D. & Mahunu, G. K. (2023). Physicochemical properties, biological properties and applications of gum tragacanth-a review. Carbohydrate Polymer Technologies and Applications 5 (2023) 100288. DOI: 10.1016/j.carpta.2023.100288
 
Chew, A. K., Sender, M., Kaplan, Z., Chandrasekaran, A., Chief Elk, J., Browning, A. R., Shaun Kwak, H., Halls, M. d. & Afzal, M. A. F. (2024). Advancing material property prediction: using physics-informed machine learning models for viscosity. DOI: 10.26434/chemrxiv-2023-1qfw8-v2
 
Haroon, K., Arafeh, A., Martin, P., Rodgers, T., Mendoza, C. & Baker, M. (2019). Use of inline near-infrared spectroscopy to predict the viscosity of shampoo using multivariate analysis. International Journal of Cosmetic Science, 2019, 41, 346–356. DOI: 10.1111/ics.12536
 
Imanmehr, A & Heidarisoltanabadi, M. (2024). The effect of mechanical processing methods on the color and viscosity properties of Tragacanth gum (In persian). Journal of Research in Mechanics of Agricultural Machinery. 13(2), 79-86. DOI: 10.22034/JRMAM.2024.14735.702
 
Lee, S., Jeong, S. & Lee, S. (2026). Hyperspectral imaging-based classification and viscosity prediction of hydrocolloids using convolutional neural network and ensemble models. Journal of Food Engineering. Volume 409. https://doi.org/10.1016/j.jfoodeng.2025.112902
 
Malashin, I., Tynchenko, V., Gantimurov, A., Nelyub, V., & Borodulin, A. (2025). Boosting-Based Machine Learning Applications in Polymer Science: A Review. Polymers 2025, 17, 499. DOI: 10.3390/polym17040499
 
Ninchan, B., Chauywongyart, P., Utapong, T., & Thamrongsiripak, N. (2024). Effect of Gamma Irradiation on Depolymerization and Property Changes of Gum Tragacanth. https://doi.org/10.1155/ijbm/8875341
 
Petkovska, J., Geskovski, N., Markovi´c, D., Dimova, V., Mirakovski, D., Radeti´c, M. & Jordanov, I. (2024). Chitosan-pectin multilayer coating with anthocyanin grape dye as pH indicating wound dressing: Synthesis and characterization. Carbohydrate Polymer Technologies and Applications 7 (2024) 100438. DOI: 10.1016/j.carpta.2024.100438
 
Qi, H., Li, H., Chen, L., Chen, F., Luo, J. & Zhang, C. (2024). Hyperspectral Imaging Using a Convolutional Neural Network with Transformer for the Soluble Solid Content and pH Prediction of Cherry Tomatoes. Foods 2024, 13, 251. https://doi.org/10.3390/foods13020251
 
Qiu, L., Zhang, M., Mujumdar, A. S. Chang, L. (2022). Convenient use of near-infrared spectroscopy to indirectly predict the antioxidant activitiy of edible rose (Rose chinensis Jacq “Crimsin Glory” H.T.) petals during infrared drying. Food Chemistry Volume 369, 1 February 2022, 130951. DOI: 10.1016/j.foodchem.2022.130951
 
Qomshi Bozorg, P., Wahabi, M. & Fazilati, M. (2012). Qualitative investigation of white gossip (Astragalus gossypinus Fischer.) in the western region of Isfahan province. Scientific-research quarterly of medicinal and aromatic plants. 27(4): 668-680. (in Persian). DOI: 10.22092/ijmapr.2012.4516
 
Tavakol, M. & Mohammadifar, M. A. (2017). A review on gum tragacanth and its biomedical applications. Nashrieh Shimi va Mohandesi Shimi Iran (NSMSI), 36(84): 1-20. (in Persian). https://www.nsmsi.ir/article_29721_en.html
 
Xuan,W., Zhao, C., Ma, Z., Liu, Z. & Zhang, J. (2025) Data-driven machine learning methods to predict the viscosity-temperature characteristics for gasification slags. Fuel. Volume 398. https://doi.org/10.1016/j.fuel.2025.135287
 
Zahedi, A. H. & Vedadi, I. (1979). Effect of Gum Tragacanth size reduction on DTA and TG behavior and its relationship to solution viscosity. Thermochimica Acta, 34: 281-286. https://doi.org/10.1016/0040-6031(79)87118-X
 
Zhang, W., Kasun, L. C., Wang, Q. J., Zheng, Y. & Lin, Z. (2022). A Review of Machine Learning for Near-Infrared Spectroscopy. Sensors 2022, 22, 9764.