Metadata-Version: 2.4
Name: riseup
Version: 0.1.0a1
Summary: RISE UP: Rest-activity Insights for Scalable Early-intervention Using Pre-trained models. A one-stop platform for analysing wearable data in health research. Funded by Wellcome Mental Health Data Prize UK (2026), delivered by Social Finance.
Author: Filippo Corponi, Bryan M. Li, Giona Calcinari
Maintainer-email: RISE UP team <riseup-lab@googlegroups.com>
License-Expression: CC-BY-4.0
Project-URL: Homepage, https://github.com/RISEUP-Lab/riseup
Project-URL: Source, https://github.com/RISEUP-Lab/riseup
Project-URL: Bug Tracker, https://github.com/RISEUP-Lab/riseup/issues
Project-URL: Changelog, https://github.com/RISEUP-Lab/riseup/blob/main/CHANGELOG.md
Keywords: wearables,wearable foundation models,mental-health,mHealth
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Requires-Python: <3.15,>=3.14
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: numpy<2.7
Requires-Dist: pandas<3,>=2.3
Requires-Dist: pyarrow
Requires-Dist: scipy
Requires-Dist: tqdm
Requires-Dist: scikit-digital-health<0.17.16,>=0.17.15
Requires-Dist: matplotlib
Requires-Dist: seaborn
Requires-Dist: psutil
Requires-Dist: tzdata; sys_platform == "win32"
Provides-Extra: aou
Requires-Dist: google-cloud-bigquery; extra == "aou"
Requires-Dist: google-cloud-bigquery-storage>=2.0.0; extra == "aou"
Requires-Dist: db-dtypes; extra == "aou"
Requires-Dist: duckdb; extra == "aou"
Requires-Dist: gcsfs; extra == "aou"
Requires-Dist: google-cloud-storage; extra == "aou"
Requires-Dist: comorbidipy>=0.8; extra == "aou"
Requires-Dist: pgeocode; extra == "aou"
Provides-Extra: e4
Requires-Dist: neurokit2<0.2.14,>=0.2.13; extra == "e4"
Provides-Extra: eplus
Requires-Dist: fastavro>=1.12.2; extra == "eplus"
Provides-Extra: viz
Requires-Dist: datashader; extra == "viz"
Requires-Dist: plotly; extra == "viz"
Provides-Extra: dashboard
Requires-Dist: riseup[viz]; extra == "dashboard"
Requires-Dist: streamlit; extra == "dashboard"
Provides-Extra: models
Requires-Dist: torch>=2.13; extra == "models"
Requires-Dist: torchvision; extra == "models"
Requires-Dist: torchaudio; extra == "models"
Requires-Dist: einops; extra == "models"
Requires-Dist: h5py; extra == "models"
Requires-Dist: pillow; extra == "models"
Requires-Dist: pydantic>=2.13; extra == "models"
Requires-Dist: ruamel.yaml; extra == "models"
Requires-Dist: safetensors; extra == "models"
Requires-Dist: schedulefree; extra == "models"
Requires-Dist: scikit-learn>=1.6; extra == "models"
Requires-Dist: tensorboard; extra == "models"
Requires-Dist: torchinfo; extra == "models"
Requires-Dist: wandb; extra == "models"
Requires-Dist: skops>=0.16.0; extra == "models"
Provides-Extra: xgboost
Requires-Dist: xgboost>=3.4.1; extra == "xgboost"
Provides-Extra: foundation
Requires-Dist: riseup[models]; extra == "foundation"
Requires-Dist: huggingface-hub<2,>=1.33.0; extra == "foundation"
Requires-Dist: chronos-forecasting<3,>=2.3.2; extra == "foundation"
Requires-Dist: mantis-tsfm<2,>=1.1.0; extra == "foundation"
Provides-Extra: search
Requires-Dist: optuna>=5.0.0; extra == "search"
Provides-Extra: explain
Requires-Dist: riseup[models]; extra == "explain"
Requires-Dist: shap>=0.54; extra == "explain"
Requires-Dist: captum>=0.9; extra == "explain"
Dynamic: license-file

# RISE UP

**Rest-activity Insights for Scalable Early-intervention Using Pre-trained models**

RISE UP is an open-source platform for analysing wearable data in health research. It is a one-stop
platform: reading recordings from different devices, processing them, extracting features,
modelling, analysis and visualisation all happen in one place. It does not reinvent methods: it
brings established open-source packages together behind one interface (scikit-digital-health and
NeuroKit2 for the signals, scikit-learn and PyTorch for the models) and gives access to pre-trained
foundation models for time series, such as Chronos-2 and MOMENT. It comes both as a **no-code
dashboard** and as a **Python package**.

What holds it together is one common format. Whatever the device and whatever the cohort, a dataset
is first brought to the **canonical tables** (one row per epoch, per night, per day), and everything
downstream is written against them. A dataset already in that format can be supplied directly.

> **RISE UP is a research tool, not a clinical decision support tool.** It is not a medical
> device, is not certified or intended for clinical use, and may not be used to support decisions
> about a person's diagnosis, monitoring or treatment.

## Status: alpha

This is **0.1.0a1, an alpha release**. Commands, settings, file layouts and stored values may
change from one alpha to the next without notice, and a dataset processed with one release may need
processing again with the next. **Online novelty detection is included and under development**;
**support for the All of Us Research Program's data will come in a later release**. What each
release changed is in the
[CHANGELOG](https://github.com/RISEUP-Lab/riseup/blob/main/CHANGELOG.md), with this release's known
limitations: one of them, a stuck accelerometer axis spoiling a recording's calibration, is worth
checking for in your own data.

## Install

The dashboard opens in your browser and runs on your own computer only: your data stay on it. The
[guide to the dashboard](https://github.com/RISEUP-Lab/riseup/blob/main/GUIDE.md) walks through its
tabs.

### Download and double-click

On a Mac with Apple Silicon (M1 or later) and macOS 26 or later (a free update for every Apple
Silicon Mac), or a Windows PC with an Intel or AMD processor:

1. From the [latest release](https://github.com/RISEUP-Lab/riseup/releases/latest), download
   `RISE-UP-macOS.zip` or `RISE-UP-Windows.zip`, and open it: on a Mac, double-click it; on
   Windows, right-click it, choose **Extract All…**, then **Extract**.
2. Double-click `RISE-UP.command` (Mac) or `RISE-UP.bat` (Windows). The file is not signed, so your
   computer asks whether to trust it:
   - **On a Mac**, the first time, "RISE-UP.command" Not Opened: click **Done**, open **System
     Settings › Privacy & Security**, scroll down to "RISE-UP.command" was blocked to protect your
     Mac, click **Open Anyway**, and confirm.
   - **On Windows**, "The publisher could not be verified. Are you sure that you want to run this
     software?": click **Run**. It asks at every start until you untick **Always ask before
     opening this file**. If Windows says "Windows protected your PC" instead, click **More
     info**, then **Run anyway**.
3. A window opens. The first time, it downloads Python 3.14, RISE UP and the exact releases of the
   packages RISE UP was tested with (about 3 GB, a few minutes, once), then opens the dashboard.
   After that it opens in under a minute, without the internet. Keep the window open while you use
   RISE UP; closing it stops RISE UP.

Everything goes into one folder, without administrator rights: `~/Library/Application
Support/RISEUP` on a Mac, `%LOCALAPPDATA%\RISEUP` on Windows. Deleting it removes RISE UP; the
dashboard keeps the records of its runs in `~/.riseup`. Each release's file installs that release,
beside any earlier one: if a new release cannot be installed (offline, say), the file of the one
before still opens it.

The file installs every extra listed below but `aou`. It cannot install MOMENT, whose library is
installed by hand: to use MOMENT, install RISE UP [from a terminal](#from-a-terminal) instead.

### From a terminal

On any other computer (an Intel Mac, an older macOS, Linux), and for using RISE UP as a Python
package. RISE UP needs **Python 3.14**. The simplest way is with
[uv](https://docs.astral.sh/uv/), which also fetches Python 3.14 if you do not have it:

```bash
uv tool install "riseup[dashboard,models]"
riseup-dashboard
```

Or, with pip, in a fresh virtual environment on Python 3.14:

```bash
pip install "riseup[dashboard,models]"
riseup-dashboard
```

Both name the `models` extra because the dashboard's analyses need it; [Extras](#extras) lists the
others.

A fresh environment matters: RISE UP pins the exact releases of the signal-processing libraries it
was checked against, so installing it beside other packages may move theirs.

As a Python package, every long job is a command, `python -m riseup.run.<name>`, which takes the
dataset's folder as `--data-root`; `python -m riseup.run.<name> --help` lists each one's settings.
For example, `python -m riseup.run.check_tables --data-root path/to/dataset` checks a dataset's
canonical tables. These commands run where RISE UP is installed as a package, as with pip above:
`uv tool install` and the double-click file make only `riseup-dashboard` a command. With uv, run
them as `uv run --python 3.14 --with "riseup[<extras>]" python -m riseup.run.<name>`, naming the
extras the command needs.

In Python, `read_canonical_tables` reads a dataset folder's canonical tables as pandas DataFrames,
here those of the first demo [below](#try-it-with-demo-data):

```python
from riseup.preprocessing.io import canonical
tables = canonical.read_canonical_tables("riseup-demo-longitudinal")
print(sorted(tables))  # ['coverage', 'daily', 'epochs', 'intervals']
```

To process data from code, start from the package's two entry points:
`riseup.preprocessing.extract_epochs` turns one participant's raw recording into the `epochs`
table, and `riseup.preprocessing.extract_classical_features` computes circadian and descriptive
features over windows of one participant's `epochs`. Each one's docstring lists its settings.

### Extras

The core processes accelerometer recordings, Axivity `.cwa` files included. Each extra adds what
one part needs:

| Extra | Adds | For |
|---|---|---|
| `dashboard` | Streamlit, and the `viz` extra | the no-code dashboard |
| `viz` | Datashader, Plotly | interactive figures, from Python |
| `e4` | NeuroKit2 | pulse (BVP) and electrodermal activity (EDA) from Empatica devices |
| `eplus` | fastavro | reading Empatica EmbracePlus files |
| `models` | PyTorch, scikit-learn and their stack | training and applying models |
| `xgboost` | XGBoost | gradient-boosted trees |
| `search` | Optuna | Bayesian hyperparameter search |
| `explain` | SHAP, Captum | explanations of a kept model |
| `foundation` | Chronos-2, MantisV2, the Hugging Face client | frozen foundation models for time series, and the Pretrained Actigraphy Transformer (PAT) for movement data |
| `aou` | Google Cloud clients | All of Us support, which is not in this release |

Of the commands, `riseup.run.e4` and `riseup.run.eplus` need `e4` for EDA and BVP, which they
process unless given `--sensors accelerometer`; `riseup.run.eplus_materialize` and
`riseup.run.eplus` need `eplus`; those about models (`experiment`, `pretrain`, `predict`, `apply`,
`explain`, `embed`, `compare_clusters`, `learners` and `leaderboard`) need `models`, most of them
even for `--help`; and the others need only the core.

Combine them as you need, for example `uv tool install "riseup[dashboard,e4,eplus,models]"`.

**MOMENT** is installed by hand: its library cannot be a dependency of a package on PyPI (every
release of it on PyPI pins an old `transformers` that the other foundation models exclude). Beside
`riseup[foundation]`:

```bash
pip install "momentfm @ git+https://github.com/moment-timeseries-foundation-model/moment.git@38f7310ad594100747ca2a8357e9c7ca7d323e0e"
```

or, with uv, `uv tool install "riseup[dashboard,foundation]" --with "momentfm @ git+https://github.com/moment-timeseries-foundation-model/moment.git@38f7310ad594100747ca2a8357e9c7ca7d323e0e"`.

### Requirements

- **Python 3.14.**
- **Memory, to process raw Axivity recordings.** A participant's sessions are processed one at a
  time, so the longest session sets what the machine needs: 0.13 to 0.15 GB per million samples it
  recorded. A day recorded at 100 Hz is 8.6 million samples, so a week at 100 Hz needs 8 to 9 GB,
  and a week at 12.5 Hz a little over 1 GB. With less memory the computer pages to disk and is
  slower: a Windows laptop with 7.3 GB of memory still built an Axivity study whose longest sessions
  need more than that, in about seven minutes. On a Mac, the dashboard starts its runs with
  `MallocLargeCache=0`, which these figures assume; from a terminal, put `MallocLargeCache=0` before
  the command, or macOS may hold twice as much or more.
- **On a Mac, Apple Silicon with macOS 26 or later.** scikit-digital-health, a core dependency,
  publishes ready-built wheels for Apple Silicon on macOS 26, for Linux on x86-64 and for Windows on
  x86-64. Anywhere else (an Intel Mac, an older macOS, Linux on ARM) it is built from source, which
  needs C and Fortran compilers. PyTorch, which the `models` extra needs, publishes wheels for Apple
  Silicon on macOS 14 or later and none for Intel Macs, so an Intel Mac cannot run RISE UP's models.
- **On Windows, an Intel or AMD processor.** PyTorch, pandas and several other dependencies publish
  no wheels for Windows on ARM (laptops with a Snapdragon processor, for example).
- **On Windows, a dataset folder with a short path.** Windows refuses a path longer than about 260
  characters unless long paths are turned on, and an experiment's results sit up to about 200
  characters below the dataset folder (more with a long label file or model name, and 18 more for
  a boosting model with early stopping or a network), so a dataset whose folder path is longer
  than about 55 characters may not hold them. The simplest fix is a
  folder such as `C:\data\my-study`. The same limit applies to what the double-click file
  installs, under `%LOCALAPPDATA%\RISEUP`: its deepest files fit for a Windows user name of up to
  about 25 characters. The other fix, for both, is to turn on long paths, once per machine, from
  PowerShell run as administrator:

  ```powershell
  New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name LongPathsEnabled -Value 1 -PropertyType DWORD -Force
  ```

  While long paths are off, an experiment measures the paths it will write before it starts, and
  one that would not fit is refused before it writes anything, saying by how many characters and
  what to shorten.

## Try it with demo data

RISE UP can make three practice datasets on your own computer, one command each (run as
[From a terminal](#from-a-terminal) says). **Everything in them
is invented**: no real person's data. The differences between their groups were planted on purpose,
at a stated size, and have **no clinical meaning**. Each is written into a new folder, or an empty
one, and the dashboard's **Dataset** tab can make them too.

**A long study, for modelling.** 120 invented people, half cases and half controls, wearing a
wristband for 24 weeks, with a visit every four weeks: hourly steps and heart rate, nights and days,
already in the canonical tables. It is ready at once to explore, and for a classification (cases
against controls), a regression (a symptom score at each visit) and a clustering (a hidden
activity level), all made in the dashboard. **About 2.8 MB on disk, and about 11 seconds to make**:

```bash
python -m riseup.run.demo --data-root riseup-demo-longitudinal --kind longitudinal
```

**Short visits, for modelling.** 80 invented people, half cases and half controls, each wearing an
Empatica E4-like wristband for 41 hours at four visits a month apart: movement, heart rate, skin
temperature and skin conductance each minute, nights and days, already in the canonical tables the
E4 processing writes. It is ready at once to explore, and for a classification (cases against
controls, or a visit in an episode against a well one), a regression and a clustering, all made in
the dashboard. **About 16 MB on disk, and about 10 seconds to make**:

```bash
python -m riseup.run.demo --data-root riseup-demo-episodic --kind episodic
```

**A short study, for processing.** 8 invented people, each wearing an Empatica E4 for 41 hours,
written as the E4's own files: movement, skin temperature, skin conductance and pulse. It is for
trying the processing and exploring what comes out, not for modelling: eight people with one
recording each are too few. **About 0.88 GB on disk, and about 13 seconds to make**:

```bash
python -m riseup.run.demo --data-root riseup-demo-sessions --kind sessions
```

Processing it takes **under half a minute for movement alone** (the first command) and **about
13 minutes for all four signals** (the second, which needs the `e4` extra). Run one or the other:
once one has written the tables, the other is refused unless given `--overwrite`.

```bash
python -m riseup.run.e4 --data-root riseup-demo-sessions --sensors accelerometer
python -m riseup.run.e4 --data-root riseup-demo-sessions
```

These times were measured on a recent laptop (an Apple M4 Pro); a slower computer takes several
times as long, a mid-range Windows laptop about six times. Making any of them needs about 1 GB of
memory. `--dry-run` says what would be written, and how big, without writing anything; `--seed`
draws other invented people. To make a demo again, delete its folder first. The data carry RISE
UP's licence, CC BY 4.0, and each folder's `dataset_description.json` says how to acknowledge
them.

## Use your own data

RISE UP works on one **dataset folder** per study:

```text
my-study/
├── dataset_description.json      the dataset's Name, Acronym and TabularFileFormat
├── participants.tsv              or .csv, or .parquet
├── participants.json             what each column of the participants file means (optional)
├── sourcedata/                   the recordings as the device saved them
└── wearables/                    or tables already in the canonical format
    ├── epochs/epoch_60s.parquet  one file per epoch length
    ├── intervals.parquet
    └── daily.parquet
```

- `dataset_description.json` names the dataset, gives it a short `Acronym`, which is written into
  the tables RISE UP builds and into every analysis's record, and says which format the tables are
  written in (`TabularFileFormat`: `parquet`, `csv` or `tsv`).
- The **participants file** has one row per participant, or per recording session, with what you
  know about them; `participants.json` describes its columns.
- `sourcedata/` holds recordings RISE UP reads itself: Axivity `.cwa`,
  Empatica E4 CSV exports and Empatica EmbracePlus Avro files (with the `eplus` extra). Data from
  any other device is brought to the canonical tables first and placed under `wearables/`.

The **canonical tables** are the one format everything downstream reads:

- `epochs`: one row per participant per epoch, a fixed time bin from one second to one hour,
  with the signals measured in it (movement, steps, heart rate, temperature, electrodermal
  activity) and whether the device was worn. It is the one table every dataset needs.
- `intervals`: one row per participant per night, the sleep episode and its measures.
- `daily`: one row per participant per day, with wear time and whether the day counts as valid.
- `coverage`, which RISE UP derives from `epochs` and you never supply. For tables written outside
  RISE UP, `python -m riseup.run.coverage --data-root my-study --apply` derives it.

The exact columns and their types are defined in `riseup/preprocessing/schema.py`. A table that
does not conform is refused with a message naming what is wrong, and the dashboard's **Dataset**
tab reports what a folder holds: which tables, which signals carry values, and the participants
file's columns. To check a folder's tables, its participants file, and any label files and splits
it holds:

```bash
python -m riseup.run.check_tables --data-root my-study
```

What a model predicts, and whom it is tested on, are files of the folder too:
`python -m riseup.run.labels` writes a **label file** from a column of the participants file (or
from a file of your own), and `python -m riseup.run.split` draws a **split** of the participants
into the sets that fit, choose and evaluate models, or freezes one you supply. Each command's
`--help` gives the details.

## Licence

RISE UP is licensed under the
[Creative Commons Attribution 4.0 International licence (CC BY 4.0)](https://github.com/RISEUP-Lab/riseup/blob/main/LICENSE).
Copyright (c) 2026 Imperial College London.

It includes code adapted from the Pretrained Actigraphy Transformer (Ruan et al., CC BY 4.0); the
[NOTICE](https://github.com/RISEUP-Lab/riseup/blob/main/NOTICE) file gives its attribution.

## Citing RISE UP

If you use RISE UP in your research, please cite it: the repository's
[CITATION.cff](https://github.com/RISEUP-Lab/riseup/blob/main/CITATION.cff) gives the reference,
and GitHub's *Cite this repository* button formats it.

## Contributing and support

Questions and bug reports are welcome as
[issues](https://github.com/RISEUP-Lab/riseup/issues); never include data about participants.
RISE UP is developed in a private repository, so pull requests are applied by hand and credited:
[CONTRIBUTING.md](https://github.com/RISEUP-Lab/riseup/blob/main/CONTRIBUTING.md) says how. Report
a security problem privately, as
[SECURITY.md](https://github.com/RISEUP-Lab/riseup/blob/main/SECURITY.md) describes. Everyone
taking part follows the
[code of conduct](https://github.com/RISEUP-Lab/riseup/blob/main/CODE_OF_CONDUCT.md).

## Use of AI

RISE UP was written with the help of generative AI. Most of its code, tests and documentation were
drafted with Claude Code, Anthropic's coding agent. The authors directed the work, made every design
and scientific choice, checked it with tests and independent reviews, and are responsible for it.
Each release's commit names Claude as a co-author.

RISE UP itself sends nothing to an AI service: every model it trains or applies runs on your own
machine.

## Funding

Funded by [Wellcome](https://wellcome.org/) Mental Health Data Prize UK (2026), delivered by
[Social Finance](https://www.socialfinance.org.uk/).
