Downloads · 30 days
0
snowfire/wellspring-latentwb1
wellspring-latentwb1 is a machine learning model from snowfire. Use it for the machine learning 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 transparent latent well-being index model. It distils six intertwined national well-being drivers into two independent, human-readable indices and predicts a country's well-being (Cantril-ladder) score from them:
Downloads · 30 days
0
Access
Public
Updated Aug 24, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other13.3 KB · 59%
From the Hugging Face model README
A transparent latent well-being index model. It distils six intertwined national well-being drivers into two independent, human-readable indices and predicts a country's well-being (Cantril-ladder) score from them:
well-being = 5.407 + 1.132 · DEV + 0.119 · SOC
Apache-2.0 — free to use, modify, and redistribute with attribution.
index_specification.json — standardization parameters + index definitions/weightslatentwb1/regression.json — fitted regression (coefficients, CIs, fit stats)import json
from huggingface_hub import hf_hub_download
spec = json.load(open(hf_hub_download("snowfire/wellspring-latentwb1", "index_specification.json")))
reg = json.load(open(hf_hub_download("snowfire/wellspring-latentwb1", "latentwb1/regression.json")))
p = reg["fit"]["params"] # {const, DEV_index_std, SOC_index_std}
def predict(row): # row: dict of the six raw drivers
z = {d: (row[d] - spec["standardize_mean"][d]) / spec["standardize_std"][d] for d in spec["drivers"]}
idx = {code: sum(ax["weights"][m] * z[m] for m in ax["members"]) for code, ax in spec["axes"].items()}
return p["const"] + p["DEV_index_std"] * idx["DEV"] + p["SOC_index_std"] * idx["SOC"]
Developed on the World Happiness Report (2015–2019), public domain (CC0), from the Gallup World Poll.