Run this model with HF Jobs

Run shahzaim/sunpulse-solar-rf on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/shahzaim/sunpulse-solar-rf. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/shahzaim/sunpulse-solar-rf on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

SunPulse: solar generation estimator (Random Forest)

Estimates hourly solar electricity generation in MW from weather, time and country, for Germany, France, Spain, Italy, Portugal, Greece, Denmark and Belgium. Built for the CT-378 Machine Learning course (NED University).

Intended use

Quick estimates and analysis for energy analysts and students. It is not a grid-management or forecasting-for-trading system and gives no guarantee about real generation.

Model

  • scikit-learn Pipeline: median imputation + standard scaling for numeric inputs, most-frequent imputation + one-hot encoding for country, then RandomForestRegressor (100 trees, min_samples_leaf=5, max_depth=25).
  • Inputs (18): temperature, relative humidity, cloud cover, wind speed, surface pressure, shortwave radiation, country, hour, day of week, month, day of year, weekend flag, and sine/cosine encodings of hour, month and day of year. The hour is in UTC.
  • shortwave_radiation is the average radiation during the hour being predicted (W/m²). Open-Meteo reports radiation as the mean of the preceding hour, so the training data uses the value stamped one hour later to match the start-of-hour timestamps of the generation data.
  • Target: solar_generation_actual (MW).
  • Trained with scikit-learn 1.6.1 (load it with the same version).

Data

Source Use Licence and terms Retrieved
Open Power System Data, time series 2020-10-06 actual solar generation Attribution required; primary data from ENTSO-E Transparency Platform and national TSOs, whose own terms apply 2026-11-21
Open-Meteo Historical Weather API hourly weather (reanalysis-based), one capital-city point per country CC BY 4.0, attribution required, free API for non-commercial use 2026-11-21

350,208 hourly records, 3 October 2015 to 30 September 2020. No personal data.

Attribution: Open Power System Data. 2020. Data Package Time series. Version 2020-10-06. https://doi.org/10.25832/time_series/2020-10-06. Weather data by Open-Meteo.com (CC BY 4.0).

Evaluation

Chronological split 70/15/15 (train/validation/test); models compared on validation, the final model was refitted on train+validation and evaluated once on the held-out test period (Jan to Sep 2020, 52,495 rows).

Metric (test) Value
MAE 421.052 MW
RMSE 1106.248 MW
R² 0.9254

Validation comparison (MAE, MW): Random Forest 266.4, Decision Tree 293.5, Gradient Boosting 307.6, Linear Regression (baseline) 1392.5.

Test MAE by country (MW): Portugal 50.6, Denmark 58.0, Greece 79.1, Belgium 143.2, Italy 330.3, France 411.5, Spain 1007.0, Germany 1285.8. Compare countries with their own generation level: their scales differ strongly.

Limitations

  • Weather is taken at one capital-city point per country, not a national average.
  • The model was trained on 2015 to 2020 capacity levels and underpredicts the newer, higher-capacity test period on average (mean test residual +330.9 MW, positive for every country and every test month); Random Forests cannot extrapolate beyond the range seen in training.
  • Spain's reported series has positive generation at night (positive in 99.97 percent of its zero-radiation hours); the reason was not verified.
  • Weather in training is reanalysis-based; forecasts used in the apps can differ.
  • The "tree spread" shown in the apps is the disagreement between trees, not a statistical confidence interval.
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using shahzaim/sunpulse-solar-rf 1