Metadata-Version: 2.4
Name: pynnlf
Version: 0.2.2
Summary: Python Network Net Load Forecasting (PyNNLF): reproducible evaluation of net load forecasting models.
License: MIT
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: attrs>=24.2.0
Requires-Dist: certifi>=2025.6.15
Requires-Dist: charset-normalizer>=3.4.2
Requires-Dist: click>=8.2.1
Requires-Dist: cmdstanpy>=1.2.5
Requires-Dist: colorama>=0.4.6
Requires-Dist: cftime>=1.6.4.post1
Requires-Dist: contourpy>=1.3.0
Requires-Dist: cycler>=0.12.1
Requires-Dist: DateTime>=5.5
Requires-Dist: debugpy>=1.8.5
Requires-Dist: decorator>=5.1.1
Requires-Dist: dill>=0.3.9
Requires-Dist: et-xmlfile>=2.0.0
Requires-Dist: filelock>=3.16.1
Requires-Dist: fonttools>=4.54.0
Requires-Dist: fsspec>=2024.12.0
Requires-Dist: holidays>=0.72
Requires-Dist: idna>=3.10
Requires-Dist: importlib_resources>=6.5.2
Requires-Dist: Jinja2>=3.1.5
Requires-Dist: joblib>=1.4.2
Requires-Dist: kiwisolver>=1.4.7
Requires-Dist: MarkupSafe>=3.0.2
Requires-Dist: matplotlib>=3.9.2
Requires-Dist: mpmath>=1.3.0
Requires-Dist: nbformat>=5.10.4
Requires-Dist: nest-asyncio>=1.6.0
Requires-Dist: netCDF4>=1.7.2
Requires-Dist: networkx>=3.4.2
Requires-Dist: numpy>=2.1.1
Requires-Dist: openpyxl>=3.1.5
Requires-Dist: packaging>=24.1
Requires-Dist: pandas>=2.2.3
Requires-Dist: patsy>=1.0.1
Requires-Dist: pillow>=10.4.0
Requires-Dist: platformdirs>=4.3.6
Requires-Dist: prophet>=1.1.6
Requires-Dist: psutil>=6.0.0
Requires-Dist: PyYAML>=6.0.2
Requires-Dist: pyyaml_env_tag>=1.1
Requires-Dist: pyzmq>=26.2.0
Requires-Dist: requests>=2.32.4
Requires-Dist: scikit-learn>=1.6.0
Requires-Dist: scipy>=1.14.1
Requires-Dist: shapely>=2.1.1
Requires-Dist: six>=1.16.0
Requires-Dist: stanio>=0.5.1
Requires-Dist: statsmodels>=0.14.4
Requires-Dist: sympy>=1.13.1
Requires-Dist: threadpoolctl>=3.5.0
Requires-Dist: torch>=2.5.1
Requires-Dist: tornado>=6.4.1
Requires-Dist: tqdm>=4.67.1
Requires-Dist: typing_extensions>=4.12.2
Requires-Dist: tzdata>=2024.1
Requires-Dist: urllib3>=2.5.0
Requires-Dist: wcwidth>=0.2.13
Requires-Dist: xgboost>=3.0.0
Requires-Dist: zope.interface>=7.0.3
Requires-Dist: pywin32>=306; platform_system == "Windows"
Provides-Extra: notebook
Requires-Dist: ipykernel>=6.29.5; extra == "notebook"
Requires-Dist: ipython>=8.27.0; extra == "notebook"
Requires-Dist: jupyter_client>=8.6.3; extra == "notebook"
Requires-Dist: jupyter_core>=5.7.2; extra == "notebook"
Requires-Dist: matplotlib-inline>=0.1.7; extra == "notebook"
Requires-Dist: prompt_toolkit>=3.0.47; extra == "notebook"
Requires-Dist: Pygments>=2.18.0; extra == "notebook"
Requires-Dist: stack-data>=0.6.3; extra == "notebook"
Requires-Dist: traitlets>=5.14.3; extra == "notebook"
Provides-Extra: docs
Requires-Dist: babel>=2.17.0; extra == "docs"
Requires-Dist: backrefs>=5.9; extra == "docs"
Requires-Dist: ghp-import>=2.1.0; extra == "docs"
Requires-Dist: griffe>=1.14.0; extra == "docs"
Requires-Dist: Markdown>=3.9; extra == "docs"
Requires-Dist: mergedeep>=1.3.4; extra == "docs"
Requires-Dist: mkdocs>=1.6.1; extra == "docs"
Requires-Dist: mkdocs-autorefs>=1.4.3; extra == "docs"
Requires-Dist: mkdocs-get-deps>=0.2.0; extra == "docs"
Requires-Dist: mkdocs-material>=9.6.20; extra == "docs"
Requires-Dist: mkdocs-material-extensions>=1.3.1; extra == "docs"
Requires-Dist: mkdocstrings>=0.30.0; extra == "docs"
Requires-Dist: mkdocstrings-python>=1.18.2; extra == "docs"
Requires-Dist: paginate>=0.5.7; extra == "docs"
Requires-Dist: pathspec>=0.12.1; extra == "docs"
Requires-Dist: pymdown-extensions>=10.16.1; extra == "docs"
Requires-Dist: PyYAML>=6.0.2; extra == "docs"
Requires-Dist: watchdog>=6.0.0; extra == "docs"

# Welcome to PyNNLF
PyNNLF (Python for Network Net Load Forecast) is a tool to evaluate net load forecasting model performance in a reliable and reproducible way.

This tool evaluates net load forecasting models aiming to make new net load forecasting research more reliable and reproducible. It includes a library of public net load datasets and common forecasting models, including simple benchmark models. Users input the forecast problem and model specification, and the tool outputs evaluation results. 
It also allows users to add datasets, models, and modify hyperparameters. Researchers claiming a new or superior model can compare their model with existing ones on public datasets. The target audience includes researchers working in academia or industry focusing on evaluating and optimizing net load forecasting models. 

A visual illustration of the tool's workflow is shown below. 

![Home Illustration](./docs/img/home_illustration.png)

# Input
1. **Forecast Target**: Dataset and forecast horizon defined in the YAML spec at example_project/specs/experiment.yaml.
2. **Model Specification**: Model and hyperparameters defined in the YAML spec at example_project/specs/experiment.yaml.

# Output
1. a1_experiment_result.csv – Contains accuracy (cross-validated test n-RMSE), stability (accuracy standard deviation), and training time.
2. a2_hyperparameter.csv – Lists the hyperparameters used for each model.
3. a3_cross_validation_result.csv – Detailed results for each cross-validation split.
4. cv_plots/ – Folder with plots including:
   - Observation vs forecast (time plot)
   - Observation vs forecast (scatter plot)
   - Residual time plot
   - Residual histogram
5. cv_test/ and cv_train/ – Folders containing time series of observations, forecasts, and residuals for each cross-validation split.

# Tool Output Naming Convention
Format:
[experiment_no]_[experiment_date]_[dataset]_[forecast_horizon]_[model]_[hyperparameter]

Example:
E00001_250915_ds0_fh30_m6_lr_hp1

# Installation Instruction
1. Install the package:
On macOS, use `python3`/`pip3` if `python`/`pip` are not available.
```bash
python -m pip install pynnlf
```

# How to Use The Tool
1. Initialize a workspace in any directory you want (example name: my_project). By default, only the sample dataset (ds0) is included. You can choose to download all datasets if needed:
On macOS, use `python3 -c` if `python -c` is not available.
```bash
python -c "import pynnlf; pynnlf.init('my_project')"
```
2. Set up your experiment in example_project/specs/experiment.yaml.
3. Run the experiment:
```bash
python -c "import pynnlf; pynnlf.run_experiment('my_project/specs/experiment.yaml')"
```
4. View results under example_project/experiment_result.

# CI
CI (Continuous Integration) is automated testing that runs on code changes. CI is available to run smoke tests on 3 models and check whether results fall within the standard benchmark.

# Output
The tool will output the evaluation result in example_project/experiment_result as one folder.

# Full Documentation
Detailed documentation including examples, testing, detailed guide, API reference, features & limitations, etc. can be seen here. [PyNNLF Documentation](https://mssamhan31.github.io/PyNNLF/)

# Acknowledgements
This project is part of Samhan's PhD study, supported by the University International Postgraduate Award (UIPA) Scholarship from UNSW, the Industry Collaboration Project Scholarship from Ausgrid, and the RACE for 2030 Scholarship. We also acknowledge Solcast and the Australian Bureau of Meteorology (BOM) for providing access to historical weather datasets for this research. We further acknowledge the use of Python libraries including Pandas, NumPy, PyTorch, Scikit-learn, XGBoost, Prophet, Statsmodels, and Matplotlib. Finally, we thank the reviewers and editor of the Journal of Open Source Software for their valuable feedback and guidance.

The authors declare that they have no competing financial, personal, or professional interests related to this work.

# Contributors
- **M. Syahman Samhan** (m.samhan@unsw.edu.au): Lead developer and researcher. Responsible for conceptualization, implementation, documentation, and experimentation.
- **Anna Bruce**: Supervisor. Provided guidance on research direction and methodology.
- **Baran Yildiz**: Supervisor. Provided guidance on research direction and methodology.
