Upload README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Symbolic Regression for Wind Speed Forecasting (EQL)
|
| 2 |
+
|
| 3 |
+
This repository contains a **TensorFlow 2.x** reproduction of the paper:
|
| 4 |
+
|
| 5 |
+
> **Symbolic regression for scientific discovery: an application to wind speed forecasting**
|
| 6 |
+
> Ismail Alaoui Abdellaoui, Siamak Mehrkanoon
|
| 7 |
+
> arXiv:2102.10570
|
| 8 |
+
|
| 9 |
+
## What was reproduced
|
| 10 |
+
|
| 11 |
+
- Full **Equation Learner (EQL)** architecture with the original activation set:
|
| 12 |
+
- `Constant`, `Identity`, `Square`, `Sin`, `Sigmoid`, `Product`
|
| 13 |
+
- **Two-phase training**:
|
| 14 |
+
1. Phase 1: Sparse-inducing `L_{0.5}` smooth regularization + rescaled MSE
|
| 15 |
+
2. Phase 2: Masked fine-tuning (freeze zero weights, re-optimize)
|
| 16 |
+
- Denmark hourly weather dataset (5 cities, 4 features, 4 lags, 6-hour ahead prediction)
|
| 17 |
+
- Pretty-printing of discovered analytical formulas via SymPy
|
| 18 |
+
|
| 19 |
+
## Repository structure
|
| 20 |
+
|
| 21 |
+
| File | Description |
|
| 22 |
+
|------|-------------|
|
| 23 |
+
| `reproduce_eql.py` | Core library: network, functions, pretty-print, regularization, utils |
|
| 24 |
+
| `run_full_experiment.py` | End-to-end training script with paper hyperparameters |
|
| 25 |
+
| `prepare_denmark_data.py` | Generates `.mat` inputs from raw weather CSV |
|
| 26 |
+
| `requirements.txt` | Dependencies |
|
| 27 |
+
|
| 28 |
+
## Dataset
|
| 29 |
+
|
| 30 |
+
The Denmark weather data (hourly, 1980–2018) is available as a Hugging Face dataset:
|
| 31 |
+
|
| 32 |
+
🔗 https://huggingface.co/datasets/Mengqinxue/eql-wind-speed-denmark
|
| 33 |
+
|
| 34 |
+
## Quick start
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
pip install -r requirements.txt
|
| 38 |
+
python run_full_experiment.py --city Roskilde --steps_ahead 6 --feature wind_speed
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
Supported cities: `Esbjerg`, `Odense`, `Roskilde`.
|
| 42 |
+
|
| 43 |
+
## Results
|
| 44 |
+
|
| 45 |
+
The script produces:
|
| 46 |
+
- `ExperimentsSR/Experiment*/` — training logs, plots, weight histograms
|
| 47 |
+
- `summary_experiment*.txt` — final MAE, MSE, extracted formula
|
| 48 |
+
- `.hdf5` weight checkpoints for Phase 1 and Phase 2
|
| 49 |
+
|
| 50 |
+
## Citation
|
| 51 |
+
|
| 52 |
+
```bibtex
|
| 53 |
+
@article{abdellaoui2021symbolic,
|
| 54 |
+
title={Symbolic regression for scientific discovery: an application to wind speed forecasting},
|
| 55 |
+
author={Abdellaoui, Ismail Alaoui and Mehrkanoon, Siamak},
|
| 56 |
+
journal={arXiv preprint arXiv:2102.10570},
|
| 57 |
+
year={2021}
|
| 58 |
+
}
|
| 59 |
+
```
|