You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/user_guide.rst
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,18 @@
2
2
3
3
:html_theme.sidebar_secondary.remove: true
4
4
5
+
.. currentmodule:: eegdash.api
6
+
7
+
5
8
User Guide
6
9
==========
7
10
8
-
This guide provides a comprehensive overview of the :mod:`eegdash` library, focusing on its core data access object, :class:`eegdash.api.EEGDashDataset`. You will learn how to use this object to find, access, and manage EEG data for your research and analysis tasks.
11
+
This guide provides a comprehensive overview of the :mod:`eegdash` library, focusing on its core data access object, :class:`~eegdash.api.EEGDashDataset`. You will learn how to use this object to find, access, and manage EEG data for your research and analysis tasks.
9
12
10
13
The EEGDash Object
11
14
------------------
12
15
13
-
While :class:`eegdash.api.EEGDashDataset` is the main tool for loading data for machine learning, the :class:`eegdash.api.EEGDash` object provides a lower-level interface for directly interacting with the metadata database. It is useful for exploring the available data, performing complex queries, or managing metadata records.
16
+
While :class:`~eegdash.api.EEGDashDataset` is the main tool for loading data for machine learning, the :class:`~eegdash.api.EEGDash` object provides a lower-level interface for directly interacting with the metadata database. It is useful for exploring the available data, performing complex queries, or managing metadata records.
14
17
15
18
Initializing EEGDash
16
19
~~~~~~~~~~~~~~~~~~~~~~~~
@@ -45,20 +48,20 @@ EEGDash vs. EEGDashDataset
45
48
46
49
It's important to understand the distinction between these two objects:
47
50
48
-
- :class:`eegdash.api.EEGDash`: Use this for querying and managing metadata. It returns a list of dictionaries, where each dictionary is a record from the database.
49
-
- :class:`eegdash.api.EEGDashDataset`: Use this when you need to load EEG data for analysis or machine learning. It returns a PyTorch-compatible dataset object where each item can load the actual EEG signal.
51
+
- :class:`~eegdash.api.EEGDash`: Use this for querying and managing metadata. It returns a list of dictionaries, where each dictionary is a record from the database.
52
+
- :class:`~eegdash.api.EEGDashDataset`: Use this when you need to load EEG data for analysis or machine learning. It returns a PyTorch-compatible dataset object where each item can load the actual EEG signal.
50
53
51
-
In general, you will use :class:`eegdash.api.EEGDashDataset` for most of your data loading needs.
54
+
In general, you will use :class:`~eegdash.api.EEGDashDataset` for most of your data loading needs.
52
55
53
56
The EEGDashDataset Object
54
57
-------------------------
55
58
56
-
The :class:`eegdash.api.EEGDashDataset` is the primary entry point for working with EEG recordings in :mod:`eegdash`. It acts as a high-level interface that allows you to query a metadata database and load corresponding EEG data, either from a remote source or from a local cache.
59
+
The :class:`~eegdash.api.EEGDashDataset` is the primary entry point for working with EEG recordings in :mod:`eegdash`. It acts as a high-level interface that allows you to query a metadata database and load corresponding EEG data, either from a remote source or from a local cache.
57
60
58
61
Initializing EEGDashDataset
59
62
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60
63
61
-
To get started, you need to create an instance of :class:`eegdash.api.EEGDashDataset`. The two most important parameters are ``cache_dir`` and ``dataset``.
64
+
To get started, you need to create an instance of :class:`~eegdash.api.EEGDashDataset`. The two most important parameters are ``cache_dir`` and ``dataset``.
62
65
63
66
- ``cache_dir``: This is the local directory where ``eegdash`` will store downloaded data.
64
67
- ``dataset``: The identifier of the dataset you want to work with (e.g., ``"ds002718"``).
@@ -82,7 +85,7 @@ This will create a dataset object containing all recordings from ``ds002718``. T
82
85
Querying for Specific Data
83
86
--------------------------
84
87
85
-
:class:`eegdash.api.EEGDashDataset` offers powerful filtering capabilities, allowing you to select a subset of recordings based on various criteria. You can filter by task, subject, session, or run.
88
+
:class:`~eegdash.api.EEGDashDataset` offers powerful filtering capabilities, allowing you to select a subset of recordings based on various criteria. You can filter by task, subject, session, or run.
86
89
87
90
Filtering by Task
88
91
~~~~~~~~~~~~~~~~~
@@ -164,11 +167,11 @@ For more complex queries, you can pass a MongoDB-style query dictionary directly
164
167
Working with Local Data (Offline Mode)
165
168
--------------------------------------
166
169
167
-
:mod:`eegdash` also supports working with local data that you have already downloaded or manage separately. By setting ``download=False``, you can instruct :class:`eegdash.api.EEGDashDataset` to use local BIDS-compliant data instead of accessing the database or remote storage.
170
+
:mod:`eegdash` also supports working with local data that you have already downloaded or manage separately. By setting ``download=False``, you can instruct :class:`~eegdash.api.EEGDashDataset` to use local BIDS-compliant data instead of accessing the database or remote storage.
168
171
169
172
To use this feature, your data must be organized in a BIDS-like structure within your ``cache_dir``. For example, if your ``cache_dir`` is ``./eeg_data`` and your dataset is ``ds002718``, the files should be located at ``./eeg_data/ds002718/``.
170
173
171
-
Here is how to use :class:`eegdash.api.EEGDashDataset` in offline mode:
174
+
Here is how to use :class:`~eegdash.api.EEGDashDataset` in offline mode:
172
175
173
176
.. code-block:: python
174
177
@@ -186,7 +189,7 @@ When ``download=False``, :mod:`eegdash` will scan the specified directory for EE
186
189
Accessing Data from the Dataset
187
190
-------------------------------
188
191
189
-
Once you have your :class:`eegdash.api.EEGDashDataset` object, you can access individual recordings as if it were a list. Each item in the dataset is an ``EEGDashBaseDataset`` object, which contains the metadata and methods to load the actual EEG data.
192
+
Once you have your :class:`~eegdash.api.EEGDashDataset` object, you can access individual recordings as if it were a list. Each item in the dataset is an :class:`~eegdash.data_utils.EEGDashBaseDataset` object, which contains the metadata and methods to load the actual EEG data.
# **Note:** in this example notebook, we load the contrast change detection task from one mini release only as an example. Naturally, you are encouraged to train your models on all complete releases, using data from all the tasks you deem relevant.
0 commit comments