ar_weights: AcceleRest Model Weights

View source: R/ar_weights.R

ar_weightsR Documentation

AcceleRest Model Weights

Description

The pretrained weights released at https://github.com/NielsRLorenzen/AcceleRest/releases. The heads "linear_sleepstages", "lstm_sleepstages", and "linear_respevents" are used for prediction; the autoencoder weights are the pretrained (not fine-tuned) backbones.

Usage

ar_weights(weights_dir = NULL, release = .ar_default_release)

ar_have_weights(
  model = NULL,
  weights_dir = ar_cache_dir(),
  quiet = TRUE,
  release = .ar_default_release
)

ar_download_weights(
  model = NULL,
  weights_dir = ar_cache_dir(),
  overwrite = FALSE,
  quiet = TRUE,
  release = .ar_default_release,
  ...
)

Arguments

weights_dir

directory where the weights are (to be) stored. If NULL, the file column is just the file name.

release

the GitHub release tag of the weights

model

the models to check or download. Defaults to the three prediction heads.

quiet

If FALSE, prints a message if weights are missing (ar_have_weights), or shows download progress (ar_download_weights).

overwrite

If TRUE, re-download files that already exist

...

additional arguments to pass to curl::curl_download()

Value

A data.frame with the model name, file, URL, expected size in bytes, and the class labels (for prediction heads).

Examples

ar_weights()
ar_have_weights()
## Not run: 
  # downloads ~35MB per model to ar_cache_dir()
  files = ar_download_weights("linear_sleepstages")

## End(Not run)

rester documentation built on Nov. 13, 2026, 1:06 a.m.