## 2 Materials and Methods
### Permutation  
This method entails permuting each feature by randomly replacing each value with another value that preceded it in the time series. Thereby ensuring that the model is not exposed to any future information when making a prediction. Following the permutation of a single feature, the SMAPE was calculated between the permuted and original predictions (Algorithm 3). Each feature was permuted 300 times to account for the stochastic nature of permutation. A simple linear regression, fitting the one-hot-encoded (OHE) permuted features to the SMAPE error inferred feature importance. Specifically, the magnitudes of the regression coefficient determined the feature importance.  
Figure 3: Overview of the ablation method on the test dataset. The time series \(\mathbf{T}\) comprises an ablation area (orange), a prediction horizon (\(h\)), and two flanking regions (yellow) of size \(w\) where \(l\) is the sequence length of the RNN models. As the models slides over, \(\mathbf{T}\) predictions that differ from the \(\mathbf{\hat{y}}\) due to inclusion of the ablated input are noted (red).  
```
input :A time series \(\textbf{X}_{i:f}\)// length \(l\) and features \(f\) :An RNN model (\(\cdot\)) \(l-(w+h)\) predictions output :SMAPE error array \(\textbf{e}_{Day}\) of size \(w\)
1\(\textbf{e}_{cell}=[\)]
2\(\hat{\textbf{y}}\leftarrow\texttt{model}\) (X) /* Iterate over each cell in the unrolled RNN model (\(\cdot\)) */
3 for each cell in 1:wdo
4X\({}_{Noise}=[\)] fori in 1:1-w-7 do
5X\({}_{temp}=\textbf{X}[\)i:i+w\(]\) /* Adds 1% noise to all features received by cell */
6X\({}_{Noise}[i]=\textbf{X}_{temp}[cell;]+\frac{\textbf{X}_{temp}[cell;]}{100}\)
7 end for
8\(\hat{\textbf{y}}_{\text{noise}}\leftarrow\texttt{model}\) (X\({}_{noise}\))
9e\({}_{SMAPE}\leftarrow\texttt{SMAPE}\) (\(\hat{\textbf{y}}_{Noise}\), \(\hat{\textbf{y}}\))
10e\({}_{cell}\leftarrow\texttt{concat}\) (\(\textbf{e}_{cell}\),\(\textbf{e}_{SMAPE}\))
11 end for return\(\textbf{e}_{cell}\)
```  
**Algorithm 2**Noise Algorithm.  
```
input :A time series \(\textbf{X}_{i:f}\)// length \(l\) and features \(f\) :An RNN model (\(\cdot\)) \(l-(w+h)\) predictions output :Importance of each feature to prediction
1X\({}_{OHE}\leftarrow[\)]
2\(\hat{\textbf{y}}_{Error}\leftarrow[\)]
3\(\hat{\textbf{y}}\leftarrow\texttt{model}\) (X)
4 forfeature in \(f\)do /* Repeated to address stochastic nature of permutation */
5 fori in 1:300 do
6X\({}_{Permuted}\leftarrow\texttt{permute}\)(X,\(feature\))// Permute all of X\({}_{f-Feature}\)
7\(\hat{\textbf{y}}_{Permuted}\leftarrow\texttt{model}\) (X\({}_{Permuted}\))
8\(\textbf{e}_{SMAPE}\leftarrow\texttt{SMAPE}\) (\(\hat{\textbf{y}}.\hat{\textbf{y}}_{Permuted}\))
9X\({}_{OHE}\leftarrow\texttt{concat}\) (X\({}_{OHE}\), OHE for Feature \(F\))
10\(\hat{\textbf{y}}_{Error}\leftarrow\texttt{concat}\) (\(\hat{\textbf{y}}_{Error}\), \(\textbf{e}_{SMAPE}\))
11 end for
12
13 end for
14 OLS \(\leftarrow\) Fit X\({}_{OHE}\) to \(\hat{\textbf{y}}_{Error}\) using a simple linear regression
15 Importance \(\leftarrow\frac{1}{n}\)\(\frac{OLS}{\sum OLS}\)// OLS refers to the feature coefficients return Importance
```  
**Algorithm 3**Permutation Algorithm.