MenGu

bciflow.datasets.mengu.mengu(subject: int = 1, session_list: List[str] | None = None, labels: List[str] | None = None, depth: List[str] | None = None, path='data/mengu/')[source]

This function loads EEG data for a specific subject and session from the MenGu dataset. It processes the data to fit the structure of the eegdata dictionary, which is used for further processing and analysis.

The dataset can be found at:
Parameters:
  • subject (int) – index of the subject to retrieve the data from.

  • session_list (list, optional) – list of session codes. default state is None, which results on the collection of all session.

  • labels (list) – list of labels used in the dataset. default state is None, which results on all labels being used.

  • depth (list) – list of depths used. default state is None, which results on all depths being used.

  • path (str) – path to the foldar that contains all dataset files.

Returns:

A dictionary containing the following keys:

  • X: EEG data as a numpy array.

  • y: Labels corresponding to the EEG data.

  • sfreq: Sampling frequency of the EEG data.

  • y_dict: Mapping of labels to integers.

  • events: Dictionary describing event markers.

  • ch_names: List of channel names.

  • tmin: Start time of the EEG data.

  • data_type: Type of the data (‘epochs’).

Return type:

dict

Raises:

ValueError – If any of the input parameters are invalid or if the specified file does not exist.

Examples

Load EEG data for subject 1, all sessions, and default labels:

>>> from bciflow.datasets import mengu
>>> eeg_data = mengu(subject=1)
>>> print(eeg_data['X'].shape)  # Shape of the EEG data
>>> print(eeg_data['y'])  # Labels