Instructions to use martibosch/lcd-bias-correction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use martibosch/lcd-bias-correction with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("martibosch/lcd-bias-correction", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Model description
Radiation-based temperature bias correction models for low-cost temperature sensors (LCDs), trained on parallel measurements against the MeteoSwiss Zollikofen (BER) reference station (summer 2025). One Explainable Boosting Machine (EBM) model per sensor type, wrapped in a scikit-learn Pipeline that selects the optimal radiation integration window. Models are serialized with skops.
Intended uses & limitations
[More Information Needed]
Training Procedure
Each model is fitted on hourly temperature bias (ΔT = T_LCD − T_ref) as a function of accumulated shortwave radiation from the nearest MeteoSwiss AWS. The optimal radiation integration window (1–5 h) is selected per sensor by maximizing Pearson correlation with ΔT before fitting the EBM.
Hyperparameters
Click to expand
| Hyperparameter | Value |
|---|---|
| memory | None |
| steps | [('radiation_transformer', BestScaleRadiationTransformer(radiation_col='radiation_shortwave', time_col='time', window_minutes=[60, 120, 180, 240, 300])), ('model', ExplainableBoostingRegressor())] |
| transform_input | None |
| verbose | False |
| radiation_transformer | BestScaleRadiationTransformer(radiation_col='radiation_shortwave', time_col='time', window_minutes=[60, 120, 180, 240, 300]) |
| model | ExplainableBoostingRegressor() |
| radiation_transformer__radiation_col | radiation_shortwave |
| radiation_transformer__time_col | time |
| radiation_transformer__window_minutes | [60, 120, 180, 240, 300] |
| model__callback | None |
| model__cat_smooth | 10.0 |
| model__cyclic_progress | False |
| model__early_stopping_rounds | 100 |
| model__early_stopping_tolerance | 1e-05 |
| model__exclude | None |
| model__feature_names | None |
| model__feature_types | None |
| model__gain_scale | 5.0 |
| model__greedy_ratio | 10.0 |
| model__inner_bags | 0 |
| model__interaction_smoothing_rounds | 100 |
| model__interactions | 5x |
| model__learning_rate | 0.04 |
| model__max_bins | 1024 |
| model__max_delta_step | 0.0 |
| model__max_interaction_bins | 64 |
| model__max_leaves | 2 |
| model__max_rounds | 50000 |
| model__min_cat_samples | 10 |
| model__min_hessian | 0.0 |
| model__min_samples_leaf | 4 |
| model__missing | separate |
| model__monotone_constraints | None |
| model__n_jobs | -2 |
| model__objective | rmse |
| model__outer_bags | 14 |
| model__random_state | 42 |
| model__reg_alpha | 0.0 |
| model__reg_lambda | 0.0 |
| model__smoothing_rounds | 500 |
| model__validation_size | 0.15 |
Model Plot
Pipeline(steps=[('radiation_transformer',BestScaleRadiationTransformer(radiation_col='radiation_shortwave',time_col='time',window_minutes=[60, 120, 180,240, 300])),('model', ExplainableBoostingRegressor())])In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
Parameters
| steps | [('radiation_transformer', ...), ('model', ...)] | |
| transform_input | None | |
| memory | None | |
| verbose | False |
Parameters
| window_minutes | [60, 120, ...] | |
| time_col | 'time' | |
| radiation_col | 'radiation_shortwave' |
Parameters
| feature_names | None | |
| feature_types | None | |
| max_bins | 1024 | |
| max_interaction_bins | 64 | |
| interactions | '5x' | |
| exclude | None | |
| validation_size | 0.15 | |
| outer_bags | 14 | |
| inner_bags | 0 | |
| learning_rate | 0.04 | |
| greedy_ratio | 10.0 | |
| cyclic_progress | False | |
| smoothing_rounds | 500 | |
| interaction_smoothing_rounds | 100 | |
| max_rounds | 50000 | |
| early_stopping_rounds | 100 | |
| early_stopping_tolerance | 1e-05 | |
| callback | None | |
| min_samples_leaf | 4 | |
| min_hessian | 0.0 | |
| reg_alpha | 0.0 | |
| reg_lambda | 0.0 | |
| max_delta_step | 0.0 | |
| gain_scale | 5.0 | |
| min_cat_samples | 10 | |
| cat_smooth | 10.0 | |
| missing | 'separate' | |
| max_leaves | 2 | |
| monotone_constraints | None | |
| objective | 'rmse' | |
| n_jobs | -2 | |
| random_state | 42 |
Evaluation Results
| Device | File | Training R² | Best radiation window |
|---|---|---|---|
| Abilium | abilium.skops |
0.591 | 60 min |
| Barani | barani.skops |
0.100 | 300 min |
| Decentlab | decentlab.skops |
0.755 | 120 min |
| Koalasense | koalasense.skops |
0.362 | 60 min |
| Onset_big | onset-big.skops |
0.215 | 300 min |
How to Get Started with the Model
from huggingface_hub import hf_hub_download
from skops import io as skops_io
from meteora.bias_correction import apply_bias_correction, parse_hf_path
model_str = "martibosch/lcd-bias-correction/decentlab.skops" # replace with your sensor
repo_id, filename = parse_hf_path(model_str)
trusted = skops_io.get_untrusted_types(
file=hf_hub_download(repo_id, filename)
)
cor_ts_df = apply_bias_correction(
lcd_ts_df,
ref_rad_ts, # pd.Series/DataFrame/xr.Dataset with shortwave radiation
model_str,
trusted=trusted,
)
Model Card Authors
This model card is written by following authors:
[More Information Needed]
Model Card Contact
You can contact the model card authors through following channels: [More Information Needed]
Citation
@unpublished{bosch2026swiss,
title = {Revisiting urban heat indices in {Switzerland} using low-cost measurement networks},
author = {{Climatology Group of the University of Bern}},
year = {2026},
note = {Manuscript under preparation}
}
- Downloads last month
- -