Skip to content

Input Data

Peter Charlton edited this page Feb 24, 2016 · 22 revisions

RRest requires a dataset on which to perform RR estimation. Several datasets are publicly available for use with RRest, as detailed here. You may also wish to use your own dataset. This page provides an overview of how to provide Input Data to RRest.

Using Publicly Available Datasets

Publicly available datasets are either provided in the required format for use with the RRest toolbox (such as the Vortal Dataset), or a 'data_importer' script is provided to download and re-format the data to prepare it for use with RRest (such as with the MIMICII Dataset). 'data_importer' scripts can be found here.

Once you have downloaded a dataset, you are ready to use RRest. You should specify its location to RRest in the up.paths.root_data_folder variable, in the setup_universal_params.m script.

Using Your Own Datasets

You may alternatively wish to analyse your own dataset with RRest. There are three steps to doing so: formatting the your dataset correctly, saving it in the appropriate location, and calling RRest appropriately. These are now explained:

Formatting your dataset

The easiest way to understand how to format your dataset for use with RRest is to look at an example, such as the synthetic dataset presented here.

A dataset must be stored in a Matlab structure array called data to be used with RRest. The structure array should be of dimension [1, n], where n is the number of recordings. The structure array should contain the following fields:

  • id : e.g. data(1).id = '001' , data(2).id = '002' , etc.
  • pleth : e.g. data(1).pleth.fs = 125 , specifying the sampling rate in Hz, and data(1).pleth.signal_e_vlf.y.v = [1,2,3,2,1] , where [1,2,3,2,1] is the row vector of PPG values for this recording.

Saving your dataset in the appropriate location

Take the following steps to ensure that your data is saved in an appropriate location for RRest to be able to find it:

  1. Create a directory called MYDATA

  2. Specify up.paths.root_folder as the directory which contains the newly created MYDATA directory. This variable is set in the setup_universal_params.m script.

  3. Save your dataset as mydata.mat, in the MYDATA directory.

Calling RRest to analyse your dataset

Use the following command to call RRest When using your own dataset:

RRest('mydata')