Downloads · 30 days
34
20% of all-time downloads
ryukkt62/Suncast
Suncast is a tabular regression model from ryukkt62. Use it for the tabular regression task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
A machine learning model that predicts hourly solar PV power generation (kWh) for any location across mainland China, given latitude, longitude, and a date range.
Downloads · 30 days
34
20% of all-time downloads
All-time downloads
173
Public
Repo size
17.6 GB
Likes
17
Public
Click a slice to open those files.
.pkl17.6 GB · 100%
From the Hugging Face model README
A machine learning model that predicts hourly solar PV power generation (kWh) for any location across mainland China, given latitude, longitude, and a date range.
| Item | Detail |
|---|---|
| Task | Tabular Regression (Solar Irradiance → PV Power) |
| Algorithm | Random Forest Regressor (via PyCaret AutoML) |
| Target Region | Mainland China (UTC+8) |
| Temporal Resolution | 1-hour intervals |
| Output Unit | kWh (1 kW standard PV plant) |
| Training Period | 2024 full year |
| Training Samples | 4,861,296 |
| Metric | Value |
|---|---|
| MAE | 76.19 W/m² |
| RMSE | 126.96 W/m² |
| R² | 0.748 |
| MAPE | 1.49% |
Notable observations:
| Variable | Unit |
|---|---|
| Surface Pressure | Pa |
| Surface Temperature | K |
| Relative Humidity (2m) | % |
| U-Component of Wind (10m) | m/s |
| V-Component of Wind (10m) | m/s |
| Sunshine Duration | s |
| Low / Mid / High Cloud Cover | % |
| Downward Short-Wave Radiation Flux | W/m² |
GFS DSWRF is a model-simulated value computed via the RRTMG radiation transfer scheme — not a direct satellite measurement.
hour_local, month_local, day_of_year, seasonRandom Forest was selected for its strong resistance to overfitting and balanced performance across all evaluation metrics.
| Setting | Value |
|---|---|
| Train / Test Split | 80% / 20% |
| Cross-Validation | k-fold (k=10) |
| Hyperparameter Tuning | Grid Search |
Predicted solar irradiance (W/m²) is converted to power generation (kWh) using pvlib.
| Parameter | Value |
|---|---|
| Panel Tilt | 25° |
| Panel Azimuth | 180° (south-facing) |
| Temperature Coefficient | −0.004 /°C |
| Capacity | 1 kW (standard) |
Power generation is set to 0 kWh before 06:00 and after 19:00 (local time).
pip install huggingface_hub pycaret[full]
from huggingface_hub import hf_hub_download
from pycaret.regression import load_model, predict_model
import pandas as pd
# Download model from Hugging Face Hub
model_path = hf_hub_download(
repo_id="ryukkt62/Suncast",
filename="Suncast_v1.pkl"
)
# Load PyCaret pipeline (strip .pkl extension)
model = load_model(model_path.replace(".pkl", ""))
# Prepare input features
input_data = pd.DataFrame([{
"sp": 101325, # Surface Pressure [Pa]
"t": 300.15, # Surface Temperature [K]
"r2": 60.0, # Relative Humidity [%]
"u10": 2.0, # U-Wind [m/s]
"v10": -1.5, # V-Wind [m/s]
"SUNSD": 3200, # Sunshine Duration [s]
"lcc": 10.0, # Low Cloud Cover [%]
"mcc": 5.0, # Mid Cloud Cover [%]
"hcc": 20.0, # High Cloud Cover [%]
"sdswrf": 650.0, # DSWRF [W/m²]
"hour_local": 12,
"month_local": 7,
"day_of_year": 190
}])
# Predict irradiance → PV power
prediction = predict_model(model, data=input_data)
print(prediction["prediction_label"])
Note: The model file is cached locally after the first download (
~/.cache/huggingface/hub/), so subsequent calls will not re-download.
| File | Description |
|---|---|
Suncast_v1.pkl | Trained PyCaret Random Forest pipeline |
config.json | Model metadata |

This model is released under the Apache 2.0 License.