Instructions to use kozy9/GWTCN with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use kozy9/GWTCN with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://kozy9/GWTCN") - Notebooks
- Google Colab
- Kaggle
Upload TCN — test RMSE 2.9366 m R² 0.5511
Browse files- README.md +11 -11
- model_config.json +13 -11
- tcn_baseline_training_history.png +0 -0
- tcn_forecast_comparison.png +2 -2
- tcn_model.keras +2 -2
- tcn_residual_analysis.png +0 -0
- tcn_tuned_training_history.png +0 -0
README.md
CHANGED
|
@@ -17,7 +17,7 @@ level forecasting using meteorological variables as exogenous inputs.
|
|
| 17 |
|
| 18 |
| Parameter | Value |
|
| 19 |
|---|---|
|
| 20 |
-
| Architecture | TCN(nb_filters=
|
| 21 |
| Framework | TensorFlow / Keras (keras-tcn) |
|
| 22 |
| Task | Single-step monthly forecasting |
|
| 23 |
| Lookback window | 24 months |
|
|
@@ -36,22 +36,22 @@ level forecasting using meteorological variables as exogenous inputs.
|
|
| 36 |
|
| 37 |
| Parameter | Value |
|
| 38 |
|---|---|
|
| 39 |
-
| nb_filters |
|
| 40 |
-
| kernel_size |
|
| 41 |
-
| dilations | [1, 2, 4, 8] |
|
| 42 |
| dropout_rate | 0.1 |
|
| 43 |
-
| learning_rate | 0.
|
| 44 |
-
| Receptive field |
|
| 45 |
|
| 46 |
## Test Set Performance
|
| 47 |
|
| 48 |
| Metric | Value |
|
| 49 |
|---|---|
|
| 50 |
-
| RMSE |
|
| 51 |
-
| MAE | 2.
|
| 52 |
-
| MAPE |
|
| 53 |
-
| R² | 0.
|
| 54 |
-
| NSE | 0.
|
| 55 |
|
| 56 |
> This model is part of a benchmark study comparing SARIMAX, LSTM, and TCN
|
| 57 |
> for UK groundwater level forecasting.
|
|
|
|
| 17 |
|
| 18 |
| Parameter | Value |
|
| 19 |
|---|---|
|
| 20 |
+
| Architecture | TCN(nb_filters=128, kernel_size=4, dilations=[1, 2, 4, 8, 16, 32]) → Dense(1) |
|
| 21 |
| Framework | TensorFlow / Keras (keras-tcn) |
|
| 22 |
| Task | Single-step monthly forecasting |
|
| 23 |
| Lookback window | 24 months |
|
|
|
|
| 36 |
|
| 37 |
| Parameter | Value |
|
| 38 |
|---|---|
|
| 39 |
+
| nb_filters | 128 |
|
| 40 |
+
| kernel_size | 4 |
|
| 41 |
+
| dilations | [1, 2, 4, 8, 16, 32] |
|
| 42 |
| dropout_rate | 0.1 |
|
| 43 |
+
| learning_rate | 0.010000 |
|
| 44 |
+
| Receptive field | 379 months |
|
| 45 |
|
| 46 |
## Test Set Performance
|
| 47 |
|
| 48 |
| Metric | Value |
|
| 49 |
|---|---|
|
| 50 |
+
| RMSE | 2.9366 m |
|
| 51 |
+
| MAE | 2.3952 m |
|
| 52 |
+
| MAPE | 3.5738% |
|
| 53 |
+
| R² | 0.5511 |
|
| 54 |
+
| NSE | 0.5511 |
|
| 55 |
|
| 56 |
> This model is part of a benchmark study comparing SARIMAX, LSTM, and TCN
|
| 57 |
> for UK groundwater level forecasting.
|
model_config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"model_type": "TCN",
|
| 3 |
-
"architecture": "TCN(nb_filters=
|
| 4 |
"framework": "TensorFlow/Keras (keras-tcn)",
|
| 5 |
"task": "Single-step monthly groundwater level forecasting",
|
| 6 |
"features": [
|
|
@@ -16,17 +16,19 @@
|
|
| 16 |
"method": "Bayesian Optimisation (Keras Tuner)",
|
| 17 |
"n_trials": 20,
|
| 18 |
"best_config": {
|
| 19 |
-
"nb_filters":
|
| 20 |
-
"kernel_size":
|
| 21 |
"dilations": [
|
| 22 |
1,
|
| 23 |
2,
|
| 24 |
4,
|
| 25 |
-
8
|
|
|
|
|
|
|
| 26 |
],
|
| 27 |
"dropout_rate": 0.1,
|
| 28 |
-
"learning_rate": 0.
|
| 29 |
-
"receptive_field":
|
| 30 |
}
|
| 31 |
},
|
| 32 |
"data_splits": {
|
|
@@ -47,11 +49,11 @@
|
|
| 47 |
}
|
| 48 |
},
|
| 49 |
"test_metrics": {
|
| 50 |
-
"RMSE":
|
| 51 |
-
"MAE": 2.
|
| 52 |
-
"MAPE_pct":
|
| 53 |
-
"R2": 0.
|
| 54 |
-
"NSE": 0.
|
| 55 |
},
|
| 56 |
"notes": "Scaler fitted on train only. Oracle exog assumption \u2014 contemporaneous met vars used at forecast time."
|
| 57 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"model_type": "TCN",
|
| 3 |
+
"architecture": "TCN(nb_filters=128, kernel_size=4, dilations=[1, 2, 4, 8, 16, 32]) \u2192 Dense(1)",
|
| 4 |
"framework": "TensorFlow/Keras (keras-tcn)",
|
| 5 |
"task": "Single-step monthly groundwater level forecasting",
|
| 6 |
"features": [
|
|
|
|
| 16 |
"method": "Bayesian Optimisation (Keras Tuner)",
|
| 17 |
"n_trials": 20,
|
| 18 |
"best_config": {
|
| 19 |
+
"nb_filters": 128,
|
| 20 |
+
"kernel_size": 4,
|
| 21 |
"dilations": [
|
| 22 |
1,
|
| 23 |
2,
|
| 24 |
4,
|
| 25 |
+
8,
|
| 26 |
+
16,
|
| 27 |
+
32
|
| 28 |
],
|
| 29 |
"dropout_rate": 0.1,
|
| 30 |
+
"learning_rate": 0.01,
|
| 31 |
+
"receptive_field": 379
|
| 32 |
}
|
| 33 |
},
|
| 34 |
"data_splits": {
|
|
|
|
| 49 |
}
|
| 50 |
},
|
| 51 |
"test_metrics": {
|
| 52 |
+
"RMSE": 2.9366,
|
| 53 |
+
"MAE": 2.3952,
|
| 54 |
+
"MAPE_pct": 3.5738,
|
| 55 |
+
"R2": 0.5511,
|
| 56 |
+
"NSE": 0.5511
|
| 57 |
},
|
| 58 |
"notes": "Scaler fitted on train only. Oracle exog assumption \u2014 contemporaneous met vars used at forecast time."
|
| 59 |
}
|
tcn_baseline_training_history.png
CHANGED
|
|
tcn_forecast_comparison.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
tcn_model.keras
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a21237d8f8dfb50926730017db6d464f22784e9990e73ce18ee1bc59a35c5c8
|
| 3 |
+
size 8868973
|
tcn_residual_analysis.png
CHANGED
|
|
tcn_tuned_training_history.png
CHANGED
|
|