Random Forest Models Fish Health Across Polluted Aquatic Habitats in
A machine learning ensemble model using the Random Forest algorithm has demonstrated a 95.1 percent cross-validation accuracy in predicting fish physiological health, heavy metal bioaccumulation, and oxidative stress across varied aquatic habitats in Pakistan,
Illustrative imageA machine learning ensemble model using the Random Forest algorithm has demonstrated a 95.1 percent cross-validation accuracy in predicting fish physiological health, heavy metal bioaccumulation, and oxidative stress across varied aquatic habitats in Pakistan, according to an ecological investigation published in The Journal of Basic and Applied Zoology. Conducted by researcher Shoaib Hassan from Bahauddin Zakariya University in Multan, the study evaluated one hundred and eighty specimens of Rohu (Labeo rohita), a major freshwater plant-feeding carp species widely distributed throughout the Indo-Gangetic riverine system. By integrating morphometric dimensions, proximate body composition, multi-organ enzymatic defense activities, and trace element tissue burdens into a multi-tier computational framework, the investigation established how machine learning can automatically classify environmental hazards across complex aquatic watersheds. Rather than relying on rigid regulatory cut-offs, the computational model quantified physiological energy reallocation directly from field data, revealing how heavy industrial contamination and municipal wastewater alter fish physiology and nutritional quality.
The field sampling design spanned six distinct geographical locations across the Punjab province of Pakistan, systematically grouped into three contrasting environmental regimes to capture a gradient of anthropogenic disturbance. The riverine environment encompassed Head Muhammad Wala along the River Chenab (Site I) and Taunsa Barrage along the River Indus (Site II), which served as baseline natural lotic habitats. Municipal and industrial wastewater discharges were sampled from the Nau Bahar Canal in Multan (Site III) and the Muzaffargarh Canal in Muzaffargarh (Site IV), representing heavily impacted aquatic corridors. Controlled aquaculture systems were represented by AL Raheem Fish Farm (Site V) and Mustaq Fish Farm (Site VI), offering commercial pond conditions characterized by managed feeding and reduced chemical pressure. All collected specimens were transported to the Animal House at the Bio-Park facility of Bahauddin Zakariya University for standardized dissection, morphometric analysis, proximate composition testing, enzymatic extraction, and atomic absorption spectrometry.
Morphometric evaluations revealed counterintuitive growth patterns between the sampled environments, demonstrating that physical length and plumpness do not necessarily indicate nutritional integrity. Specimens collected from the wastewater canals exhibited the greatest average total length at 22.8 ± 1.1 centimeters and possessed the highest condition factor of 1.49, calculated using the standard volumetric length-weight equation. In contrast, fish harvested from the commercial aquaculture ponds demonstrated a lower condition factor ranging between 1.00 and 1.01, despite attaining the largest overall wet weight with a peak mass of 182.3 ± 5.5 grams at a mean total length of 20.0 centimeters. Length-weight regressions showed near-perfect positive correlations exceeding 0.99 among total length, fork length, and standard length, confirming isometric growth across baseline populations, while wet weight correlated with length at a Pearson coefficient of 0.97. The elevated condition factor in wastewater fish reflected bodily distension rather than healthy somatic accumulation.
Proximate composition analyses confirmed a pronounced negative correlation between tissue moisture content and nutrient density across the three study environments. Specimens from the commercial pond farms displayed the highest nutritional quality, exhibiting maximum crude protein concentrations ranging from 17.89 percent to 18.04 percent, crude lipid levels between 3.44 percent and 3.47 percent, and ash content between 3.45 percent and 3.91 percent, paired with the lowest water content of 74.58 percent to 75.22 percent. Conversely, fish inhabiting the wastewater canals suffered substantial nutritional degradation, with muscle protein dropping to between 14.56 percent and 15.22 percent and lipids falling to between 2.62 percent and 2.98 percent. These nutritionally depleted wastewater specimens maintained an elevated moisture content between 79.47 percent and 79.87 percent. Intermediate values emerged from the riverine sites, where protein ranged between 16.22 percent and 17.05 percent, lipids measured 3.12 percent to 3.14 percent, and moisture spanned 77.00 percent to 77.20 percent.
Biochemical screening of vital organs revealed that heavy metal exposure elicited powerful, statistically significant differences in antioxidant enzyme activity among the six sites. Analysis of variance indicated significant site-dependent variation for superoxide dismutase (p = 0.001), catalase (p = 0.000), and peroxidase (p = 0.001) extracted from homogenized liver, kidney, heart, and gill tissues. The highest superoxide dismutase activity appeared at wastewater Site III, reaching 0.798 ± 0.03 units per milligram of protein, whereas the lowest was recorded at river Site II at 0.444 ± 0.03 units. Catalase activity peaked at wastewater Site III at 281 ± 7.19 units per milligram of protein compared to a minimum of 212 ± 5.72 units at river Site I, while peroxidase activity reached a maximum of 0.70 ± 0.05 units per milligram at Site III and a minimum of 0.330 ± 0.02 units at pond Site VI. These elevated enzymatic activities reflected intense reactive oxygen species production triggered by environmental toxins.
Geochemical profiling via atomic absorption spectrometry identified distinct contamination hotspots, with wastewater channels accumulating dangerous concentrations of toxic trace metals. Fish tissues from Sites III and IV contained marked concentrations of lead, iron, arsenic, cadmium, mercury, and chromium. Lead concentrations in wastewater fish reached 0.380 micrograms per gram, surpassing the critical ecotoxicological threshold of 0.35 micrograms per gram, whereas pond and river specimens remained within baseline levels between 0.11 and 0.19 micrograms per gram. Total iron peaked in wastewater specimens between 25.8 and 26.5 micrograms per gram, exceeding the 25.0 microgram critical limit. Arsenic levels in wastewater reached 8.6 micrograms per gram against an 8.5 critical threshold, while mercury concentrations surged five-fold from 0.016 micrograms per gram in pond fish to 0.085 micrograms per gram in wastewater fish, eclipsing the 0.08 regulatory safety line. Chromium likewise exceeded its critical threshold of 0.55 micrograms per gram, measuring up to 0.580 micrograms per gram.
The computational architecture of the predictive model was developed in Python 3.12 using the scikit-learn library, structuring input variables into a hierarchical multi-tier regression pipeline. Tier 1 incorporated physical sampling habitats, Tier 2 evaluated proximate nutritional attributes, Tier 3 mapped oxidative stress biomarkers, and Tier 4 integrated trace element accumulation profiles. In Tier 5, multiple parallel decision trees independently processed feature combinations before aggregating predictions through majority voting. In feature importance rankings, antioxidant enzymes dominated the hierarchy, accounting for a combined 68 percent of decision power, with superoxide dismutase representing the primary split feature at a Gini score of 0.52, followed by catalase at 0.38 and peroxidase at 0.15. Proximate nutritional attributes contributed 18 percent of model explanation, serving as confirmatory secondary decision nodes. Five-fold stratified cross-validation confirmed consistent predictive stability across folds, demonstrating that the ensemble avoided overfitting despite the modest sample size.
Predictive accuracy varied systematically between biological response categories, reflecting the underlying physiological mechanisms governing element accumulation and metabolic compensation. The Random Forest model achieved near-exceptional fidelity when predicting bioavailability-dependent toxic metals, recording prediction accuracies of 98 percent for mercury, 95 percent for cadmium, 92 percent for arsenic, and 90 percent for lead, yielding an overall mean cross-validation accuracy of 94 percent. Conversely, homeostatically regulated essential micronutrients exhibited substantially poorer predictive performance, with cobalt registering 72 percent accuracy, nickel 78 percent, and zinc 87 percent. Because internal physiological feedbacks, intestinal absorption controls, and metallothionein binding regulate essential element concentrations, their tissue levels fluctuated independently of ambient water concentrations. In the nutritional category, protein was modeled at 84 percent accuracy, ash at 81 percent, and moisture at 76 percent, reflecting secondary metabolic reallocation where stressed organisms diverted energy reserves from tissue growth toward cellular detoxification.
The automated framework successfully indexed watershed contamination into three continuous hazard categories without imposing arbitrary administrative thresholds: an optimum baseline class with a 62 percent risk index, a moderate exposure class at 78 percent, and a critical hazard class reaching 90 percent. Stressed wastewater fish exhibited an edema-like physiological state, wherein water content climbed to nearly 80 percent while protein and lipid stores suffered severe depletion. The Random Forest decision trees recognized that specimens from aquaculture ponds maintained elevated catalase and superoxide dismutase activities without experiencing nutritional penalties, distinguishing adaptive enzyme induction from catastrophic toxic exhaustion. In wastewater specimens, however, peak enzyme activities coincided with dramatic somatic deterioration, confirming that energetic trade-offs limit the organism’s capacity to sustain long-term antioxidant defense. By linking biochemical markers directly to macronutrient depletion, the algorithm successfully separated intermediate pollution states that linear models typically fail to resolve.
Based on these computational and physiological findings, the study advocates for a structured three-tier biomonitoring framework for regulatory agencies overseeing aquatic habitats. Tier 1 surveillance should prioritize non-essential, bioavailability-dependent trace elements—specifically cadmium and mercury—which provide reliable quantitative signatures of anthropogenic industrial effluents. Tier 2 validation should track secondary indicators including iron, arsenic, and zinc to evaluate bioavailability gradients and tissue sequestration burdens across broader river basins. Tier 3 mechanistic assessment should quantify superoxide dismutase and catalase enzyme dynamics, capturing early physiological stress signatures prior to irreversible tissue necrosis and fish mortality. The researchers cautioned that homeostatically buffered elements such as calcium, potassium, sodium, and cobalt should be excluded from routine environmental compliance screening due to high residual variance. Overall, the study demonstrates that ensemble machine learning offers a powerful, data-integrated methodology for watershed risk assessment, reducing experimental animal usage while enhancing ecological monitoring accuracy.
Subject of Research: Machine learning evaluation of fish health and heavy metal bioaccumulation in Pakistani waters
Article Title: Decoding fish health trajectories across anthropogenically impacted habitats: integrating machine learning approaches for ecological assessment in Pakistan
Article References: Hassan, S. (2026). Decoding fish health trajectories across anthropogenically impacted habitats: integrating machine learning approaches for ecological assessment in Pakistan. The Journal of Basic and Applied Zoology, 87(1), Article 107. https://doi.org/10.1186/s41936-026-00649-4
Image Credits: AI Generated
DOI: 10.1186/s41936-026-00649-4
Keywords: Random Forest, Labeo rohita, aquatic ecotoxicology, superoxide dismutase, catalase, peroxidase, heavy metal bioaccumulation, condition factor, proximate body composition, biomonitoring, environmental risk assessment, Pakistan freshwater, cadmium contamination, mercury bioaccumulation, water pollution, oxidative stress biomarkers, metabolic energy reallocation
News Source: Drew Townsend. (November 26, 2026). Random Forest Models Fish Health Across Polluted Aquatic Habitats in Pakistan. Scienmag.
