AI-Aquatica

Predictive validation protocol

The primary AI-Aquatica modelling workflow uses scikit-learn pipelines so that all data-dependent preprocessing is fitted exclusively on training data.

Leakage prevention

The following transformations are registered by the fluent API but are not fitted immediately:

During holdout or cross-validation, the sequence is fitted independently inside each training partition:

training partition
  -> median imputer fit
  -> standard scaler fit
  -> optional PCA fit
  -> Random Forest fit
  -> prediction on untouched evaluation partition

The evaluation data are never used to determine imputation statistics, scaling parameters, or predictive PCA components.

Exploratory PCA is treated separately. pca(..., use_for_model=False) produces descriptive scores and loadings but does not transform the predictors used by the Random Forest. When use_for_model=True, a separate PCA transformer is fitted within every training fold.

Supported validation strategies

The SoftwareX real-dataset workflow uses GroupKFold with month as the sampling-campaign group. All four station observations from a given campaign remain in the same fold, reducing the risk that correlated observations from the same campaign appear in training and evaluation data.

Classification outputs

The pipeline exports:

Regression outputs

The pipeline exports:

Reproduction command

python examples/real_dataset_workflow.py --output outputs/real_dataset

For grouped validation, 95% confidence intervals are obtained by cluster bootstrap of complete validation groups (campaigns), preserving within-campaign dependence. For non-grouped validation, the bootstrap resamples out-of-sample observations.

The command exports machine-readable JSON and CSV results, figures, processed data, a validation summary and a standalone HTML report.