Lilly Makkos
commited on
Commit
·
66f43ca
1
Parent(s):
0cc5bf3
corrected minor errors
Browse files- README.md +11 -11
- no_veg/data/normalized_test_data2_no_veg_input.pth +3 -0
- no_veg/data/normalized_test_data_no_veg_input.pth +2 -2
- no_veg/example_inference.py +5 -5
- veg/MultiTaskConvLSTM_veg_variables.pth +2 -2
- veg/data/normalized_test_data2_veg_input.pth +3 -0
- veg/data/normalized_test_data_veg_input.pth +2 -2
- veg/example_inference.py +2 -3
README.md
CHANGED
|
@@ -9,7 +9,7 @@ tags:
|
|
| 9 |
- vegetation
|
| 10 |
- amazon
|
| 11 |
model-index:
|
| 12 |
-
- name: MultiTask ConvLSTM
|
| 13 |
results:
|
| 14 |
- task:
|
| 15 |
type: time-series-forecasting
|
|
@@ -19,25 +19,25 @@ model-index:
|
|
| 19 |
type: reanalysis
|
| 20 |
metrics:
|
| 21 |
- type: mean_squared_error
|
| 22 |
-
value: 0.
|
| 23 |
- type: spearman_correlation
|
| 24 |
-
value: 0.
|
| 25 |
- type: pearson_correlation
|
| 26 |
-
value: 0.
|
| 27 |
- type: kendall_tau
|
| 28 |
-
value: 0.
|
| 29 |
- type: nash_sutcliffe_efficiency
|
| 30 |
-
value: 0.
|
| 31 |
- type: f1
|
| 32 |
-
value: 0.
|
| 33 |
- type: accuracy
|
| 34 |
-
value: 0.
|
| 35 |
- type: precision
|
| 36 |
-
value: 0.
|
| 37 |
- type: ROC-AUC
|
| 38 |
-
value: 0.
|
| 39 |
- type: recall
|
| 40 |
-
value: 0.
|
| 41 |
---
|
| 42 |
|
| 43 |
# MultiTask ConvLSTM for Precipitation Prediction
|
|
|
|
| 9 |
- vegetation
|
| 10 |
- amazon
|
| 11 |
model-index:
|
| 12 |
+
- name: MultiTask ConvLSTM w/veg inputs
|
| 13 |
results:
|
| 14 |
- task:
|
| 15 |
type: time-series-forecasting
|
|
|
|
| 19 |
type: reanalysis
|
| 20 |
metrics:
|
| 21 |
- type: mean_squared_error
|
| 22 |
+
value: 0.28
|
| 23 |
- type: spearman_correlation
|
| 24 |
+
value: 0.87
|
| 25 |
- type: pearson_correlation
|
| 26 |
+
value: 0.79
|
| 27 |
- type: kendall_tau
|
| 28 |
+
value: 0.70
|
| 29 |
- type: nash_sutcliffe_efficiency
|
| 30 |
+
value: 0.62
|
| 31 |
- type: f1
|
| 32 |
+
value: 0.82
|
| 33 |
- type: accuracy
|
| 34 |
+
value: 0.90
|
| 35 |
- type: precision
|
| 36 |
+
value: 0.90
|
| 37 |
- type: ROC-AUC
|
| 38 |
+
value: 0.97
|
| 39 |
- type: recall
|
| 40 |
+
value: 0.75
|
| 41 |
---
|
| 42 |
|
| 43 |
# MultiTask ConvLSTM for Precipitation Prediction
|
no_veg/data/normalized_test_data2_no_veg_input.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e5b76c968c3a80b260f8db30d5e9c219c241ac26fd44856c3c87008394dac8e9
|
| 3 |
+
size 1644632048
|
no_veg/data/normalized_test_data_no_veg_input.pth
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:b190904dceead14eb69a6e0cc7d25456a9fb99fb352821a4bb9a1a2189bcb0db
|
| 3 |
+
size 1644634018
|
no_veg/example_inference.py
CHANGED
|
@@ -3,7 +3,7 @@ import torch
|
|
| 3 |
from MultiTaskConvLSTM import ConvLSTMNetwork
|
| 4 |
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, roc_auc_score
|
| 5 |
import torch
|
| 6 |
-
import
|
| 7 |
from tqdm.auto import tqdm
|
| 8 |
from utils import (
|
| 9 |
mse, mae, nash_sutcliffe_efficiency, r2_score, pearson_correlation,
|
|
@@ -24,7 +24,7 @@ set_forecast_horizon = 1
|
|
| 24 |
#Define variables for evaluation
|
| 25 |
batch_size = 16
|
| 26 |
time_steps_out = set_forecast_horizon
|
| 27 |
-
channels =
|
| 28 |
|
| 29 |
#Variable names
|
| 30 |
#Variable names
|
|
@@ -32,8 +32,8 @@ variable_names = ['10 metre U wind component', '10 metre V wind component', '2 m
|
|
| 32 |
|
| 33 |
# Adjust input_dim and output_channels according to your data specifics
|
| 34 |
model = ConvLSTMNetwork(
|
| 35 |
-
input_dim=
|
| 36 |
-
hidden_dims=[
|
| 37 |
kernel_size=(3,3),
|
| 38 |
num_layers=3,
|
| 39 |
output_channels=64 * set_forecast_horizon,
|
|
@@ -46,7 +46,7 @@ bce_loss_fn = nn.BCELoss() # For classification output
|
|
| 46 |
|
| 47 |
optimizer = optim.AdamW(model.parameters(), lr = 0.005)
|
| 48 |
|
| 49 |
-
checkpoint = torch.load("MultiTaskConvLSTM_no_veg_variables")
|
| 50 |
model.load_state_dict(checkpoint['model_state_dict'])
|
| 51 |
|
| 52 |
# If you want to move the model to the GPU (optional, depending on your setup)
|
|
|
|
| 3 |
from MultiTaskConvLSTM import ConvLSTMNetwork
|
| 4 |
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, roc_auc_score
|
| 5 |
import torch
|
| 6 |
+
import torch.nn as nn
|
| 7 |
from tqdm.auto import tqdm
|
| 8 |
from utils import (
|
| 9 |
mse, mae, nash_sutcliffe_efficiency, r2_score, pearson_correlation,
|
|
|
|
| 24 |
#Define variables for evaluation
|
| 25 |
batch_size = 16
|
| 26 |
time_steps_out = set_forecast_horizon
|
| 27 |
+
channels = 8
|
| 28 |
|
| 29 |
#Variable names
|
| 30 |
#Variable names
|
|
|
|
| 32 |
|
| 33 |
# Adjust input_dim and output_channels according to your data specifics
|
| 34 |
model = ConvLSTMNetwork(
|
| 35 |
+
input_dim=8 * set_lookback,
|
| 36 |
+
hidden_dims=[8, 32, 64],
|
| 37 |
kernel_size=(3,3),
|
| 38 |
num_layers=3,
|
| 39 |
output_channels=64 * set_forecast_horizon,
|
|
|
|
| 46 |
|
| 47 |
optimizer = optim.AdamW(model.parameters(), lr = 0.005)
|
| 48 |
|
| 49 |
+
checkpoint = torch.load("MultiTaskConvLSTM_no_veg_variables.pth", map_location = device)
|
| 50 |
model.load_state_dict(checkpoint['model_state_dict'])
|
| 51 |
|
| 52 |
# If you want to move the model to the GPU (optional, depending on your setup)
|
veg/MultiTaskConvLSTM_veg_variables.pth
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:5e14b94f02be8e5ea077091c165cedc5b140fe935b5d30f33aaa2722883b3618
|
| 3 |
+
size 1383508
|
veg/data/normalized_test_data2_veg_input.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:075c60cf83a2d7ef68720b72c77f41a034d6418b67085e016fff6a5bdfef878c
|
| 3 |
+
size 2631223074
|
veg/data/normalized_test_data_veg_input.pth
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:5d6345f35427703eae9bd718ec420566dd253c5dab6b17a3a9c99dbf6b4f18b2
|
| 3 |
+
size 2631222089
|
veg/example_inference.py
CHANGED
|
@@ -3,7 +3,7 @@ import torch
|
|
| 3 |
from MultiTaskConvLSTM import ConvLSTMNetwork
|
| 4 |
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, roc_auc_score
|
| 5 |
import torch
|
| 6 |
-
import
|
| 7 |
from tqdm.auto import tqdm
|
| 8 |
from utils import (
|
| 9 |
mse, mae, nash_sutcliffe_efficiency, r2_score, pearson_correlation,
|
|
@@ -45,7 +45,7 @@ bce_loss_fn = nn.BCELoss() # For classification output
|
|
| 45 |
|
| 46 |
optimizer = optim.AdamW(model.parameters(), lr = 0.005)
|
| 47 |
|
| 48 |
-
checkpoint = torch.load("MultiTaskConvLSTM_veg_variables")
|
| 49 |
model.load_state_dict(checkpoint['model_state_dict'])
|
| 50 |
|
| 51 |
# If you want to move the model to the GPU (optional, depending on your setup)
|
|
@@ -146,7 +146,6 @@ def evaluate(model, test_loader, reg_loss_fn, class_loss_fn, device, variable_na
|
|
| 146 |
"Pearson": pearson_correlation(y_true_reg_flat, y_pred_reg_flat),
|
| 147 |
"Spearman": spearman_correlation(y_true_reg_flat, y_pred_reg_flat),
|
| 148 |
"NSE": nash_sutcliffe_efficiency(y_true_reg_flat, y_pred_reg_flat),
|
| 149 |
-
"Percentage Error": percentage_error(y_true_reg_flat, y_pred_reg_flat),
|
| 150 |
"Percentage Bias": percentage_bias(y_true_reg_flat, y_pred_reg_flat),
|
| 151 |
"Kendall Tau": kendall_tau(y_true_reg_flat, y_pred_reg_flat),
|
| 152 |
"Spatial Correlation": spatial_correlation(y_true_reg_flat, y_pred_reg_flat)}
|
|
|
|
| 3 |
from MultiTaskConvLSTM import ConvLSTMNetwork
|
| 4 |
from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, roc_auc_score
|
| 5 |
import torch
|
| 6 |
+
import torch.nn as nn
|
| 7 |
from tqdm.auto import tqdm
|
| 8 |
from utils import (
|
| 9 |
mse, mae, nash_sutcliffe_efficiency, r2_score, pearson_correlation,
|
|
|
|
| 45 |
|
| 46 |
optimizer = optim.AdamW(model.parameters(), lr = 0.005)
|
| 47 |
|
| 48 |
+
checkpoint = torch.load("MultiTaskConvLSTM_veg_variables.pth", map_location = device)
|
| 49 |
model.load_state_dict(checkpoint['model_state_dict'])
|
| 50 |
|
| 51 |
# If you want to move the model to the GPU (optional, depending on your setup)
|
|
|
|
| 146 |
"Pearson": pearson_correlation(y_true_reg_flat, y_pred_reg_flat),
|
| 147 |
"Spearman": spearman_correlation(y_true_reg_flat, y_pred_reg_flat),
|
| 148 |
"NSE": nash_sutcliffe_efficiency(y_true_reg_flat, y_pred_reg_flat),
|
|
|
|
| 149 |
"Percentage Bias": percentage_bias(y_true_reg_flat, y_pred_reg_flat),
|
| 150 |
"Kendall Tau": kendall_tau(y_true_reg_flat, y_pred_reg_flat),
|
| 151 |
"Spatial Correlation": spatial_correlation(y_true_reg_flat, y_pred_reg_flat)}
|