\documentclass[11pt]{article}
\usepackage[margin=2.2cm]{geometry}
\usepackage{graphicx}
\usepackage{array}
\usepackage{caption}
\usepackage{float}
\usepackage{url}
\begin{document}

\begin{center}
{\Large \textbf{Supplementary Material}}\\[0.4cm]
{\large A transferable explainable and uncertainty-aware machine learning framework for water quality classification in data-scarce regions}
\end{center}

\section*{Overview}
This supplementary file provides additional tables and figures supporting the reproducibility and interpretation of the proposed framework. It includes extended model selection outputs, Water Potability feature-engineering results, explainability summaries, strict uncertainty diagnostics and complementary figures.

\begin{table}[!htbp]
\caption{Supplementary Table S1. Final selected models and predictive performance.}
\label{tab:supp_final_models}
\centering
\scriptsize
\renewcommand{\arraystretch}{1.15}
\begin{tabular}{p{0.18\textwidth}p{0.18\textwidth}p{0.18\textwidth}ccc}
\hline
Task & Dataset & Model & Accuracy & Balanced accuracy & F1-macro \tabularnewline
\hline
Binary potability & Water Potability & random forest & 0.6890 & 0.6627 & 0.6655 \tabularnewline
Groundwater quality & Telangana 2018 & hist gradient boosting & 1.0000 & 1.0000 & 1.0000 \tabularnewline
Groundwater quality & Telangana 2019 & hist gradient boosting & 1.0000 & 1.0000 & 1.0000 \tabularnewline
WQI rule-recovery & Water Quality Testing & extra trees & 1.0000 & 1.0000 & 1.0000 \tabularnewline
WQI rule-recovery & Water Quality Data & lightgbm & 0.9894 & 0.9792 & 0.9861 \tabularnewline
\hline
\end{tabular}
\end{table}

\begin{table}[!htbp]
\caption{Supplementary Table S2. Best feature-engineered Water Potability model configurations.}
\label{tab:supp_potability_best}
\centering
\scriptsize
\renewcommand{\arraystretch}{1.15}
\begin{tabular}{cp{0.46\textwidth}cc cc}
\hline
Rank & Configuration & Prototype & Features & Accuracy & F1-macro \tabularnewline
\hline
1 & base only; quantile normal; smote; random forest & Yes & 9 & 0.6890 & 0.6655 \tabularnewline
2 & base missing; quantile normal; borderline smote; random forest & Yes & 18 & 0.6753 & 0.6522 \tabularnewline
3 & ratio interaction; quantile normal; none; hist gradient boosting & No & 42 & 0.6707 & 0.6515 \tabularnewline
4 & base missing; standard; smote; extra trees & Yes & 18 & 0.6753 & 0.6498 \tabularnewline
5 & base missing; robust; none; extra trees & No & 18 & 0.6951 & 0.6489 \tabularnewline
6 & base missing; standard; none; extra trees & No & 18 & 0.6951 & 0.6489 \tabularnewline
7 & ratio interaction; quantile normal; none; mlp & Yes & 42 & 0.6768 & 0.6486 \tabularnewline
8 & base missing; robust; smote; mlp & Yes & 18 & 0.6860 & 0.6445 \tabularnewline
\hline
\end{tabular}
\end{table}

\begin{table}[!htbp]
\caption{Supplementary Table S3. Feature-engineering inventory for the Water Potability task.}
\label{tab:supp_feature_inventory}
\centering
\scriptsize
\renewcommand{\arraystretch}{1.15}
\begin{tabular}{p{0.25\textwidth}cp{0.55\textwidth}}
\hline
Feature set & Features & Description \tabularnewline
\hline
base only & 9 & Original physicochemical variables only \tabularnewline
base missing & 18 & Original variables with missingness indicators \tabularnewline
base nonlinear & 45 & Original variables with nonlinear transformations \tabularnewline
domain reference & 55 & Distance and exceedance descriptors relative to reference values \tabularnewline
ratio interaction & 42 & Physicochemical ratios, interactions and differences \tabularnewline
engineered all & 106 & Feature-engineering group \tabularnewline
base safe wqi & 13 & Feature-engineering group \tabularnewline
engineered all safe wqi & 110 & Feature-engineering group \tabularnewline
\hline
\end{tabular}
\end{table}

\begin{table}[!htbp]
\caption{Supplementary Table S4. Explainability summary across task families.}
\label{tab:supp_explainability}
\centering
\scriptsize
\renewcommand{\arraystretch}{1.15}
\begin{tabular}{p{0.20\textwidth}p{0.20\textwidth}p{0.18\textwidth}p{0.34\textwidth}}
\hline
Task & Dataset & Model & Dominant variables \tabularnewline
\hline
Binary potability & Water Potability & random forest & sulfate, ph, solids, chloramines, hardness \tabularnewline
Binary potability & Water Potability & extra trees & ph, sulfate, solids, chloramines, hardness \tabularnewline
Groundwater quality & Telangana 2018 & hist gradient boosting & electrical conductivity, sar, sodium, total hardness, bicarbonate \tabularnewline
Groundwater quality & Telangana 2019 & hist gradient boosting & electrical conductivity, potassium, sodium, groundwater level, rsc \tabularnewline
WQI rule-recovery & Water Quality Testing & extra trees & dissolved oxygen, conductivity, ph, temperature, turbidity \tabularnewline
WQI rule-recovery & Water Quality Data & lightgbm & ph, dissolved oxygen, salinity, water depth, temperature \tabularnewline
\hline
\end{tabular}
\end{table}

\begin{table}[!htbp]
\caption{Supplementary Table S5. Strict uncertainty and reliability synthesis.}
\label{tab:supp_uncertainty}
\centering
\scriptsize
\renewcommand{\arraystretch}{1.15}
\begin{tabular}{p{0.18\textwidth}p{0.18\textwidth}p{0.15\textwidth}cccc}
\hline
Task & Dataset & Model & Accuracy & Review rate & Reliable rate & Reliable accuracy \tabularnewline
\hline
Binary potability & Water Potability & random forest & 0.6585 & 0.6311 & 0.0625 & 0.8780 \tabularnewline
Binary potability & Water Potability & extra trees & 0.6418 & 0.5747 & 0.0991 & 0.8462 \tabularnewline
Groundwater quality & Telangana 2018 & hist gradient boosting & 1.0000 & 0.0000 & 1.0000 & 1.0000 \tabularnewline
Groundwater quality & Telangana 2019 & hist gradient boosting & 0.9863 & 0.0137 & 0.9863 & 1.0000 \tabularnewline
WQI rule-recovery & Water Quality Testing & extra trees & 1.0000 & 0.0100 & 0.9900 & 1.0000 \tabularnewline
WQI rule-recovery & Water Quality Data & lightgbm & 0.9810 & 0.0000 & 0.9979 & 0.9831 \tabularnewline
\hline
\end{tabular}
\end{table}

\begin{table}[!htbp]
\caption{Supplementary Table S6. Cross-task uncertainty comparison and calibration indicators.}
\label{tab:supp_calibration}
\centering
\scriptsize
\renewcommand{\arraystretch}{1.15}
\begin{tabular}{p{0.18\textwidth}p{0.18\textwidth}p{0.15\textwidth}cccc}
\hline
Task & Dataset & Model & ECE uncal. & ECE cal. & Threshold & Caution rate \tabularnewline
\hline
Binary potability & Water Potability & random forest & 0.0393 & 0.0292 & 0.67 & 0.3064 \tabularnewline
Binary potability & Water Potability & extra trees & 0.0746 & 0.0367 & 0.66 & 0.3262 \tabularnewline
Groundwater quality & Telangana 2018 & hist gradient boosting & 0.0100 & 0.0847 & 0.50 & 0.0000 \tabularnewline
Groundwater quality & Telangana 2019 & hist gradient boosting & 0.0163 & 0.0895 & 0.50 & 0.0000 \tabularnewline
WQI rule-recovery & Water Quality Testing & extra trees & 0.0129 & 0.0206 & 0.50 & 0.0000 \tabularnewline
WQI rule-recovery & Water Quality Data & lightgbm & 0.0139 & 0.0296 & 0.50 & 0.0021 \tabularnewline
\hline
\end{tabular}
\end{table}

\begin{table}[!htbp]
\caption{Supplementary Table S7. Strict uncertainty selected models.}
\label{tab:supp_selected_uncertainty}
\centering
\scriptsize
\renewcommand{\arraystretch}{1.15}
\begin{tabular}{p{0.18\textwidth}p{0.18\textwidth}p{0.16\textwidth}p{0.18\textwidth}cc}
\hline
Task & Dataset & Model & Augmentation & F1-macro & Ranking metric \tabularnewline
\hline
Binary potability & Water Potability & random forest & smote & -- & 0.6655 \tabularnewline
Binary potability & Water Potability & extra trees & borderline smote & -- & 0.6482 \tabularnewline
Groundwater quality & Telangana 2018 & hist gradient boosting & random oversampling & 1.0000 & 1.0000 \tabularnewline
Groundwater quality & Telangana 2019 & hist gradient boosting & borderline smote & 1.0000 & 1.0000 \tabularnewline
WQI rule-recovery & Water Quality Testing & extra trees & none & 1.0000 & 1.0000 \tabularnewline
WQI rule-recovery & Water Quality Data & lightgbm & none & 0.9861 & 0.9861 \tabularnewline
\hline
\end{tabular}
\end{table}


\clearpage
\section*{Supplementary figures}

\begin{figure}[H]
\centering
\includegraphics[width=0.85\textwidth]{potability_learning_curve_f1_macro.png}
\caption{Supplementary Figure S1. Learning curve for the Water Potability task using F1-macro as the evaluation metric.}
\label{fig:supp_potability_learning_curve}
\end{figure}

\begin{figure}[H]
\centering
\includegraphics[width=0.85\textwidth]{potability_feature_overlap.png}
\caption{Supplementary Figure S2. Feature-overlap analysis between potable and non-potable samples. Higher overlap values indicate stronger similarity of feature distributions across the two classes.}
\label{fig:supp_potability_feature_overlap}
\end{figure}

\section*{Repository note}
The processed tables, Python scripts and extended result files may be deposited in an online repository. The repository link or DOI should be added here when available.

\end{document}
