Views
No views yet
| Model | RMSE ↓ | MAE | R² | Improvement |
|---|---|---|---|---|
| BiLSTM (this model) | 6.38 | 3.82 | 0.556 | Baseline |
| LSTM+Attention | 9.19 | 5.37 | 0.264 | -30.6% |
| Linear Regression | 9.89 | 5.85 | 0.176 | -35.5% |
| SARIMA | 11.52 | 6.78 | -0.090 | -44.6% |
Input(30, 13)
↓ 1import tensorflow as tf
2from huggingface_hub import hf_hub_download
3
4# Download model
5model_path = hf_hub_download(
6 repo_id="Davidavid4/bilstm-terrorism-forecasting-gtd",
7 filename="bidirectional_lstm_best.h5"
8)
9
10# Load model
11model = tf.keras.models.load_model(model_path)
12
13# Prepare input: shape (batch_size, 30, 13)
14# - 30 weeks of historical data
15# - 13 features per week
16
17# Make predictions
18predictions = model.predict(X_test)