This model is part of a benchmark study comparing SARIMAX, LSTM, and TCN
for UK groundwater level forecasting.
Important Note
Contemporaneous meteorological variables are used as inputs at forecast time
(oracle assumption). Future met values are treated as known — consistent with
the experimental setup used across all models in this study.
Repository Contents
├── tcn_model.keras # Trained Keras TCN model
├── scaler_features.pkl # Feature scaler (MinMaxScaler, fit on train only)
├── scaler_target.pkl # Target scaler (MinMaxScaler, for inverse transform)
├── model_config.json # Config, hyperparameters & metrics
├── inference.py # Load model & generate forecasts
└── README.md # This file
Quick Start
python
1from huggingface_hub import hf_hub_download
2from tensorflow.keras.models import load_model
3import joblib, pandas as pd, numpy as np
45model = load_model(hf_hub_download('kozy9/GWTCN','tcn_model.keras'))6scaler_features = joblib.load(hf_hub_download('kozy9/GWTCN','scaler_features.pkl'))7scaler_target = joblib.load(hf_hub_download('kozy9/GWTCN','scaler_target.pkl'))89# Provide a 24-month window of features10X_window = pd.DataFrame({11'water_level':[...],# 24 values12'temperature':[...],13'precipitation':[...],14'wind_speed':[...],15})1617X_scaled = scaler_features.transform(X_window)18X_input = X_scaled.reshape(1,24,4)19y_scaled = model.predict(X_input)20pred = scaler_target.inverse_transform(y_scaled)[0][0]21print(f'Next month forecast: {pred:.2f} m')