How gist-ailab/transfer-learning-pv-forecasting works
This repository implements photovoltaic power forecasting across sites, with a documented source-to-target transfer-learning workflow: refine large-scale source PV data, train a forecasting model, then adapt it to local sites and evaluate predictions. The main runtime entry point is run_longExp.py; the experiment runner coordinates dataset loading, model training/testing, and metrics. The README also documents preprocessing and multiple regional datasets. Some subsystems are represented by their exact enclosing directories because their source was not sampled; edges reflect documented workflow or visible imports/calls, not assumed internal wiring.
Main entry points: exp_main.py Train and test · data_preprocessing Format and clean · data_loader.py Regional datasets · run_longExp.py Experiment entry
Components 15
Data preparation
- Format and clean
data_preprocessing - Regional datasets
data_provider/data_loader.py - Dataset selection
data_provider/data_factory.py
Forecasting and transfer
- Experiment entry
run_longExp.py - Train and test
exp/exp_main.py - Experiment setup
exp/exp_basic.py - PatchTST model
models/PatchTST.py - Patch encoder layers
layers/PatchTST_backbone.py - Alternative models
models - Forecast utilities
utils/tools.py
Evaluation and results
- Forecast metrics
utils/metrics.py - Site forecasts
- Evaluation results
Other components
- Researcher
- Regional PV data
Connections 14
- Researcher → Experiment entry: starts run
- Regional PV data → Format and clean: supplies data
- Format and clean → Regional datasets: refines data
- Regional datasets → Dataset selection: provides samples
- Experiment entry → Train and test: runs experiments
- Train and test → Dataset selection: requests batches
- Train and test → Experiment setup: initializes
- Train and test → PatchTST model: trains or adapts
- Train and test → Alternative models: selects model
- PatchTST model → Patch encoder layers: uses encoder
- Train and test → Forecast utilities: uses utilities
- Train and test → Forecast metrics: evaluates predictions
- Train and test → Site forecasts: produces predictions
- Forecast metrics → Evaluation results: reports scores