Instructions to use redr1g/final-thesis-experiments with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use redr1g/final-thesis-experiments with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://redr1g/final-thesis-experiments") - Notebooks
- Google Colab
- Kaggle
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
tags:
|
| 4 |
+
- time-series-forecasting
|
| 5 |
+
- finance
|
| 6 |
+
- lstm
|
| 7 |
+
- keras
|
| 8 |
+
---
|
| 9 |
+
# Time-Series Forecasting for Virtual Item Prices
|
| 10 |
+
|
| 11 |
+
This repository contains trained machine learning and deep learning models for forecasting the price direction of virtual assets based on time-series data.
|
| 12 |
+
|
| 13 |
+
## Best Model
|
| 14 |
+
The best performance was achieved by the **LSTM** neural network on the `Kneedle (MAE <= 0.416)` data pool, yielding a metric of **ROC-AUC = 0.6567**.
|
| 15 |
+
|
| 16 |
+
**Final model architecture:**
|
| 17 |
+
* `LSTM(128)` – recurrent layer, tanh activation
|
| 18 |
+
* `Dropout(0.3)`
|
| 19 |
+
* `Dense(64, ReLU)`
|
| 20 |
+
* `Dense(1, sigmoid)` – probability of price increase
|
| 21 |
+
|
| 22 |
+
## Repository Structure
|
| 23 |
+
* `lstm_final_kneedle.keras` — the main optimized model.
|
| 24 |
+
* `lstm_final_kneedle_cosmetics.keras` — model for the alternative dataset (appendix).
|
| 25 |
+
* `best_experiments/` — the best models across 14 different algorithms (CatBoost, XGBoost, TabNet, etc.) after pool optimization.
|
| 26 |
+
|
| 27 |
+
## Benchmarking
|
| 28 |
+
|
| 29 |
+
| Model | Best Pool | ROC-AUC |
|
| 30 |
+
|:---|:---|:---|
|
| 31 |
+
| **LSTM** | **Kneedle (MAE ≤ 0.416)** | **0.6567** |
|
| 32 |
+
| CatBoost | RF Gating (t = 0.7) | 0.6446 |
|
| 33 |
+
| XGBoost | ENN (t = 0.7) | 0.6405 |
|
| 34 |
+
| TabNet | RF Gating (t = 0.7) | 0.6398 |
|
| 35 |
+
| LightGBM | DROP3 (t = 0.7) | 0.6339 |
|
| 36 |
+
| Decision Tree | RF Gating (t = 0.7) | 0.6296 |
|
| 37 |
+
| Random Forest | RF Gating (t = 0.7) | 0.6294 |
|
| 38 |
+
| MLP | ENN (t = 0.7) | 0.6292 |
|
| 39 |
+
| Logistic Regression| DT Filter (t = 0.5) | 0.6235 |
|
| 40 |
+
| SVM | ENN (t = 0.7) | 0.6178 |
|
| 41 |
+
| KNN | Kneedle (MAE ≤ 0.416) | 0.5844 |
|
| 42 |
+
| Naive Bayes | DT Filter (t = 0.5) | 0.5731 |
|
| 43 |
+
| 1D-CNN | ENN (t = 0.7) | 0.5367 |
|
| 44 |
+
| AutoARIMA | DT Filter (t = 0.7) | 0.5027 |
|
| 45 |
+
|
| 46 |
+
## Inference
|
| 47 |
+
|
| 48 |
+
```python
|
| 49 |
+
from huggingface_hub import hf_hub_download
|
| 50 |
+
from tensorflow.keras.models import load_model
|
| 51 |
+
|
| 52 |
+
# Load the best model
|
| 53 |
+
model_path = hf_hub_download(
|
| 54 |
+
repo_id="redr1g/final-thesis-experiments",
|
| 55 |
+
filename="lstm_final_kneedle.keras"
|
| 56 |
+
)
|
| 57 |
+
model = load_model(model_path)
|
| 58 |
+
```
|