yasa.Hypnogram.from_dict# classmethod Hypnogram.from_dict(d)[source]# Reconstruct a Hypnogram from a dictionary produced by to_dict. All metadata is restored: epoch duration, start datetime (including timezone), scorer name, and stage probabilities (if present). Added in version 0.7.0. Parameters: ddictA dictionary with keys "values", "n_stages", "freq", "start", "scorer", and "proba", as returned by to_dict. Returns: hypHypnogramThe reconstructed Hypnogram. See also to_dictReturn the Hypnogram as a JSON-serializable dictionary. from_jsonLoad a Hypnogram from a JSON file on disk.