Predicting Fish Species Richness in Mid-Atlantic Highland Streams Using Explainable Machine Learning
Although freshwater fish species richness is commonly used as an indicator for stream ecosystem conditions, predicting richness is difficult because of the complex and nonlinear relationships between habitat, environmental, and watershed-scale variables. This study uses and compares seven distinct machine learning models (Linear Regression, K-Nearest Neighbors, Random Forest, Extra Trees, LightGBM, CatBoost, and XGBoost) to predict the richness of fish species in Mid-Atlantic Highland streams with physicochemical, habitat, and watershed predictors. Hyperparameter tuning was used to optimize models which were then evaluated with 5-fold cross-validation and separate test data. Ensemble-based models outperformed simpler approaches, and XGBoost achieved the best performance (test R2 = 0.744, NMAE = 0.253) and lower error than all competing models (Wilcoxon p < 0.05). Further SHAP analysis revealed log-transformed watershed area as the most influential predictor of species richness. Conductivity and various other key water chemistry variables also held significant influence, showing the combined influence of watershed structure and local stream conditions. Additional sensitivity analysis showed that performance is heavily driven by a few key features, with model accuracy peaking when the five to seven top-ranked variables are included. Nevertheless, the small sample size and the regional and historical extent of the data limit the results. This may limit generalizability to other systems and more contemporary conditions.
Authors
- Justin Ngan
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-10-29
- DOI
- https://doi.org/10.5281/zenodo.23780455
- Primary Topic
- Fish Ecology and Management Studies
- Type
- preprint