Datasets:

Formats:
parquet
ArXiv:
License:
Dataset Viewer
The dataset viewer is not available for this dataset.
Unexpected token '<', "<html> <h"... is not valid JSON

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Example Code for Using the Dataset

import numpy as np
from torch.utils.data import Dataset
from datasets import load_dataset

class PretrainDataset(Dataset):
    def __init__(self, window_size=4096, nvar=11):
        self.window_size = window_size
        self.nvar = nvar

        # init dataset
        self.ds = load_dataset("mosaic-laboratory/dynamic_systems_pretrain")

    def __len__(self):
        return sum([len(self.ds[k]) for k in self.ds.keys()])

    def __getitem__(self, idx):
        # sample from the correct systen set ['chaos', 'signals', 'series'] based on idx
        if idx < self.ds['chaos']:
            ds_k = 'chaos'
            ds_idx = idx
        elif idx < self.ds['chaos'] + self.ds['signals']:
            ds_k = 'signals'
            ds_idx = idx - self.ds['chaos']
        else:
            ds_k = 'series'
            ds_idx = idx - self.ds['chaos'] - self.ds['signals']

        traj = np.array(self.ds[ds_k][ds_idx]['data']) # nvar, L

        # append dummy
        if traj.shape[0] < self.nvar: # if less, duplicate
            dummy_traj = np.random.choice(np.arange(traj.shape[0]), self.nvar-traj.shape[0], replace=True)
            traj = np.concatenate((traj, traj[dummy_traj]), axis=0)
        elif traj.shape[0] > self.nvar: # if more, random sample
            traj = traj[np.random.choice(np.arange(traj.shape[0]), self.nvar, replace=False)]
        
        # shuffle channels
        var_idx = np.random.permutation(traj.shape[0])
        traj = np.take(traj, var_idx, axis=0)

        # in-sample normalization
        traj = np.nan_to_num(traj, nan=0.0, posinf=0.0, neginf=0.0)
        traj_std = traj.std(axis=1, keepdims=True)
        traj_std[traj_std == 0] = 1.0
        traj = (traj - traj.mean(axis=1, keepdims=True)) / (traj_std + 1e-8)

        # clip
        if traj.shape[1] > self.window_size:
            start_idx = np.random.choice(np.arange(traj.shape[1]-self.window_size))
            traj = traj[:, start_idx:start_idx+self.window_size]

        # packing
        curr_pack = {
            'sample': torch.from_numpy(traj).float() # nvar, L
        }
        
        # packing
        return curr_pack

Reference:

  1. Lai, Jeffrey, Anthony Bao, and William Gilpin. "Panda: A pretrained forecast model for chaotic dynamics.", ICLR, preprint arXiv:2505.13755 (2026).
  2. Luo, Yunfei, et al. "Toward World Modeling of Physiological Signals with Chaos-Theoretic Balancing and Latent Dynamics." preprint arXiv:2605.15465 (2026).
Downloads last month
69

Collection including mosaic-laboratory/dynamic_systems_pretrain

Papers for mosaic-laboratory/dynamic_systems_pretrain