> For the complete documentation index, see [llms.txt](https://ashrithsagar.gitbook.io/eeg-imagined-speech-recognition/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ashrithsagar.gitbook.io/eeg-imagined-speech-recognition/usage/configuration-file.md).

# Configuration file

The configuration file `config.yaml` contains the paths to the data files and the parameters for the different workflows.

Refer to [config-template.yaml](https://github.com/AshrithSagar/EEG-Imagined-speech-recognition/blob/main/config-template.yaml) for the template.

## \_select

| Parameter  | Type  | Description                                                                     |
| ---------- | ----- | ------------------------------------------------------------------------------- |
| classifier | `str` | Select one from { RegularClassifier, ClassifierGridSearch, EvaluateClassifier } |
| dataset    | `str` | Select one from { KaraOne, FEIS }                                               |

## classifier

| Parameter                  | Type                                               | Description                                                              |
| -------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------ |
| features\_select\_k\_best: | `dict`                                             |                                                                          |
| - k                        | <p><code>int</code><br><code>list\[int]</code></p> | Number of top features to select                                         |
| - score\_func              | `str`                                              | Name of the score function for ranking features (pearsonr, f\_classif)   |
|                            |                                                    |                                                                          |
| model\_base\_dir           | `path`                                             | Preferably use `files/Models/`                                           |
| models                     | `list[str]`                                        | List of directory names containing `model.py` within them                |
| n\_splits                  | `int`                                              | Number of splits in cross-validation                                     |
| random\_state              | `int`                                              | Seed value                                                               |
| test\_size                 | `float`                                            | Size of test split                                                       |
| trial\_size                | <p><code>float</code><br><code>null</code></p>     | Fraction of dataset for testing purposes (use `null` for entire dataset) |

## feis

| Parameter      | Type                                                                            | Description                                                                                                                                               |
| -------------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| epoch\_type    | `str`                                                                           | One from { thinking, speaking, stimuli }                                                                                                                  |
| features\_dir  | `path`                                                                          | Preferably use `files/Features/FEIS/features-1/`                                                                                                          |
| raw\_data\_dir | `path`                                                                          | Preferably use `files/Data/FEIS/data_eeg/`                                                                                                                |
| subjects       | <p><code>'all'</code><br><code>list\[int]</code><br><code>list\[str]</code></p> | Specify subjects to use (use `'all'` for all subjects)                                                                                                    |
| tasks          | `list[int]`                                                                     | Available tasks: `[0]`. Refer [FEISDataLoader.get\_task()](https://github.com/AshrithSagar/EEG-Imagined-speech-recognition/blob/main/utils/feis.py#L356); |

## karaone

| Parameter           | Type                                                                            | Description                                                                                                                                                                 |
| ------------------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| epoch\_type         | `str`                                                                           | One from { thinking, speaking, stimuli, clearing }                                                                                                                          |
| features\_dir       | `path`                                                                          | Preferably use `files/Features/KaraOne/features-1/`                                                                                                                         |
| filtered\_data\_dir | `path`                                                                          | Preferably use `files/Data/KaraOne/EEG_data-1/`                                                                                                                             |
| length\_factor      | `float`                                                                         | Determines the window length                                                                                                                                                |
| overlap             | `float`                                                                         | Determines the overlap between consecutive windows                                                                                                                          |
| raw\_data\_dir      | `path`                                                                          | Preferably use `files/Data/KaraOne/EEG_raw/`                                                                                                                                |
| subjects            | <p><code>'all'</code><br><code>list\[int]</code><br><code>list\[str]</code></p> | Specify subjects to use (use `'all'` for all subjects)                                                                                                                      |
| tasks               | `list[int]`                                                                     | Available tasks: `[0, 1, 2, 3, 4]`. Refer [KaraOneDataLoader.get\_task()](https://github.com/AshrithSagar/EEG-Imagined-speech-recognition/blob/main/utils/karaone.py#L885); |
| tfr\_dataset\_dir   | `path`                                                                          | Preferably use `files/TFR/KaraOne/tfr_ds-1/`                                                                                                                                |

## utils

| Parameter | Type   | Description                                            |
| --------- | ------ | ------------------------------------------------------ |
| path      | `path` | Absolute path to the project directory `utils/` folder |
