Package: xaiHydro 0.1.0

xaiHydro: Explainable AI Tools for Hydro-Climate Modelling

Provides a unified workflow for applying Explainable Artificial Intelligence (XAI) methods to hydro-climate predictive models. Functions implement a permutation-based Monte Carlo SHAP estimator (Strumbelj and Kononenko (2014) <doi:10.1007/s10115-013-0679-x>; Lundberg and Lee (2017) <doi:10.48550/arXiv.1705.07874>), a self-contained locally weighted linear surrogate LIME (Ribeiro et al. (2016) <doi:10.1145/2939672.2939778>), and Partial Dependence Plots with Accumulated Local Effects (Friedman (2001) <doi:10.1214/aos/1013203451>; Apley and Zhu (2020) <doi:10.1111/rssb.12377>) with hydrology-specific visualisations and interpretation utilities. Supports any model object compatible with the 'DALEX' explainer interface (Biecek (2018) <doi:10.18637/jss.v097.i01>), including random forests, gradient boosting, and neural networks trained on streamflow, drought indices, flood risk, or evapotranspiration data. Hydrology-standard performance metrics Nash-Sutcliffe Efficiency (NSE, Nash and Sutcliffe (1970) <doi:10.1016/0022-1694(70)90255-6>) and Kling-Gupta Efficiency (KGE, Gupta et al. (2009) <doi:10.1016/j.jhydrol.2009.08.003>) are computed alongside standard regression metrics. Designed to accompany the book chapter: Islam, S., Dheeraj, A., Ali, S., Kaushal, R. and Venkatesh, G. (2026). Explainable Artificial Intelligence for Hydro-Climatic Modelling: Methods, Applications, and Implementation Using the xaiHydro R Package. In Chandniha, S. K. et al. (Eds.), Hydro-Climate Analytics: Remote Sensing, AI and Geospatial Modelling. Springer.

Authors:Sadikul Islam [aut, cre], Shakir Ali [aut], Rajesh Kaushal [aut]

xaiHydro_0.1.0.tar.gz
xaiHydro_0.1.0.zip(r-4.7-any)xaiHydro_0.1.0.zip(r-4.6-any)xaiHydro_0.1.0.zip(r-4.5-any)
xaiHydro_0.1.0.tgz(r-4.6-any)xaiHydro_0.1.0.tgz(r-4.5-any)
xaiHydro_0.1.0.tar.gz(r-4.7-any)xaiHydro_0.1.0.tar.gz(r-4.6-any)
xaiHydro_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
xaiHydro/json (API)

# Install 'xaiHydro' in R:
install.packages('xaiHydro', repos = c('https://sadikulislamiasri-hub.r-universe.dev', 'https://cloud.r-project.org'))

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

3.00 score 16 downloads 16 exports 45 dependencies

Last updated from:6241613e6f. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK208
source / vignettesOK266
linux-releaseOK205
macos-releaseOK104
macos-oldrelOK107
windows-develOK87
windows-releaseOK81
windows-oldrelOK81
wasm-releaseOK131

Exports:hydro_breakdownhydro_explainerhydro_importancehydro_limehydro_pdphydro_residualshydro_shaphydro_xai_reportplot_breakdown_hydroplot_importance_hydroplot_lime_hydroplot_pdp_hydroplot_shap_summaryplot_shap_waterfallsim_drought_datasim_streamflow_data

Dependencies:clicodetoolscpp11DALEXdigestdoFuturedplyrfarverforeachfuturefuture.applygenericsggplot2globalsgluegridExtragtableiBreakDowningredientsisobanditeratorskernelshaplabelinglifecyclelistenvmagrittrparallellypatchworkpillarpkgconfigpurrrR6RColorBrewerrlangS7scalesstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr

xaiHydro Methods Reference
Overview | Method 1: SHAP (SHapley Additive exPlanations) | Mathematical definition | Key properties | Computational implementation | Method 2: LIME | Implementation | Selecting kernel_width | Method 3: Partial Dependence Plots (PDP) | Limitation: correlated predictors | Method 4: Accumulated Local Effects (ALE) | When to use ALE vs PDP | Method 5: Permutation variable importance | Definition | Choosing the right XAI method | Reporting checklist for book chapters | References

Last update: 2026-09-24
Started: 2026-09-24

xaiHydro: Explainable AI Tools for Hydro-Climate Modelling
Introduction | Background | The xaiHydro package | Scope of this vignette | Installation | Simulated datasets | Daily streamflow dataset | Monthly drought index dataset | Model training | Random Forest — streamflow prediction | XGBoost — drought index prediction | The hydro explainer | Creating an explainer | Explainer for XGBoost (custom predict wrapper) | SHAP Analysis | Computing SHAP values | Global SHAP summary plot | Single-observation waterfall | LIME Explanation | Partial Dependence Profiles | PDP — marginal effects | ALE — preferred for correlated predictors | Variable Importance | Prediction Breakdown | Residual Diagnostics | Full automated XAI report | Complete drought index case study | Interpreting XAI results in a hydro-climate context | Physical interpretation of SHAP | ALE vs PDP selection guide | LIME local R² threshold | Session information | References

Last update: 2026-09-24
Started: 2026-09-24