Downloads · 30 days
6
8% of all-time downloads
anonymous-4FAD/Ridge
Ridge is a time series forecasting model from anonymous-4FAD. Use it for the time series forecasting task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
A sklearn-trained Ridge regressor (with StandardScaler) re-packaged as a transformers-compatible Hub model. One repo holds four feature ablations selectable at load time:
Downloads · 30 days
6
8% of all-time downloads
All-time downloads
71
Public
Repo size
12.5 KB
Likes
0
Public
Click a slice to open those files.
.safetensors12.5 KB · 41%
From the Hugging Face model README
A sklearn-trained Ridge regressor (with StandardScaler) re-packaged as a
transformers-compatible Hub model. One repo holds four feature ablations
selectable at load time:
cgm — 24 CGM lags + hour_sin/hour_cos (26 features).insulin — cgm features + 24 Insulin lags (50 features).carbs — cgm features + 24 Carbs lags (50 features).all — cgm features + 24 Insulin lags + 24 Carbs lags (74 features).History length is 24 (= 2 hours at 5-minute sampling). Output is 12 future CGM values (5–60 min horizons).
config.json — auto_map wiring + per-ablation feature lists.model.py — RidgeMultiHorizonConfig / RidgeMultiHorizonModel
(trust_remote_code=True).model_<ablation>.safetensors — one per ablation, holding scaler_mean,
scaler_scale, coef (12 × F), intercept (12).from transformers import AutoConfig, AutoModel
cfg = AutoConfig.from_pretrained(
"anonymous-4FAD/Ridge", trust_remote_code=True, ablation="cgm"
)
model = AutoModel.from_pretrained(
"anonymous-4FAD/Ridge", trust_remote_code=True, config=cfg
)
# Inputs match the MetaboNet benchmark.py contract:
# timestamps: int64 ns, shape (B, T_in)
# cgm/insulin/carbs: float, shape (B, T_in); only the last 24 steps are used
preds = model.predict(timestamps, cgm, insulin, carbs) # -> (B, 12)
The thin local wrapper in
models/ridge.py
exposes the same API used by benchmark.py.
CGM_t<i> denotes the i-th sample within the last history_length steps,
ordered oldest -> newest (CGM_t0 is the oldest of the 24, CGM_t23 is the
newest). The same convention applies to Insulin_t<i> and Carbs_t<i>.
hour_sin / hour_cos are derived from the most recent input timestamp.
Trained via
other_models/results/train_ridge.py
on the public MetaboNet train split. The safetensors checkpoints are produced
by scripts/build_other_models_hub.py
from the original sklearn pickles.