How to Use The Tool¶
-
Initialize a workspace. This page uses
example_projectas the example workspace name. By default, only the sample dataset (ds0) is included.Run this in Python. On macOS, start Python with
python3ifpythonis not available.import pynnlf pynnlf.init("example_project") -
Fill in the input values for your forecast problem and model specification in
example_project/specs/experiment.yaml.dataset: ds0 forecast_horizon: fh1 # fh1 = 30 minutes ahead model: m6 # Linear regression hyperparameter: hp1 # Hyperparameter ID -
Run the experiment.
import pynnlf pynnlf.run_experiment("example_project/specs/experiment.yaml") -
To skip plot generation and save storage, use the per-run override.
import pynnlf pynnlf.run_experiment( "example_project/specs/experiment.yaml", plot_enabled=False, ) -
Run a batch of experiments (optional).
import pynnlf pynnlf.run_experiment_batch("example_project/specs/batch.yaml")To skip plot generation for every experiment in the batch:
import pynnlf pynnlf.run_experiment_batch( "example_project/specs/batch.yaml", plot_enabled=False, ) -
Recap multiple experiments into one CSV (optional).
import pynnlf pynnlf.recap_experiments("example_project/experiment_result")This writes
example_project/experiment_result/a1_experiment_result.csvand skips missing or malformed CSVs with warnings. -
The tool outputs evaluation results to
example_project/experiment_result/. The*_cv1_plots/folder is created only when plot generation is enabled.
For the list of available datasets and models, how to modify model hyperparameters, how to add a model, how to add a dataset, and the API reference, see the Detailed Guide page.