Configuration#
Dataclass configuration objects used across the package.
Classes:
| Name | Description |
|---|---|
DatasetPaths |
Filesystem locations used by data and experiment workflows. |
PreprocessingConfig |
Preprocessing and augmentation settings. |
DataSplitConfig |
Train/validation/test split settings. |
TrainingConfig |
Training defaults shared by examples and notebook runs. |
ModelConfig |
Model architecture defaults. |
DatasetPaths
dataclass
#
DatasetPaths(
raw_dir: Path = Path("data/raw"),
processed_dir: Path = Path("data/processed"),
local_cache_dir: Path | None = Path("data_temp"),
artifacts_dir: Path = Path("artifacts/runs"),
)
Filesystem locations used by data and experiment workflows.
Attributes:
| Name | Type | Description |
|---|---|---|
raw_dir |
Path
|
Directory for official downloaded BCI IV-2a archives and extracted GDF files. |
processed_dir |
Path
|
Directory for generated project |
local_cache_dir |
Path | None
|
Optional directory containing an existing local cache of the six |
artifacts_dir |
Path
|
Directory for generated reports, metrics, and plots. |
PreprocessingConfig
dataclass
#
PreprocessingConfig(
sub_sample: int = 2,
average: int = 2,
noise: bool = True,
noise_std: float = 0.5,
max_time_step: int = 500,
n_classes: int = 4,
label_offset: int = 769,
seed: int = 1,
)
Preprocessing and augmentation settings.
Attributes:
| Name | Type | Description |
|---|---|---|
sub_sample |
int
|
Temporal stride used for max-pooling and subsampling augmentation. |
average |
int
|
Window size used for average-pooling augmentation. |
noise |
bool
|
Whether to add Gaussian noise to averaged/subsampled augmentations. |
noise_std |
float
|
Standard deviation of Gaussian augmentation noise. |
max_time_step |
int
|
Number of raw time samples kept before temporal reduction. |
n_classes |
int
|
Number of output classes. |
label_offset |
int
|
Offset used to convert BCI cue labels |
seed |
int
|
Random seed for deterministic validation splits and augmentation. |
DataSplitConfig
dataclass
#
TrainingConfig
dataclass
#
TrainingConfig(
epochs: int = 100,
gan_epochs: int = 20,
batch_size: int = 64,
gan_batch_size: int = 128,
learning_rate: float = 0.001,
gan_learning_rate: float = 0.0003,
use_gan_augmentation: bool = False,
gan_samples_per_class: int = 10,
seed: int = 1,
fast_dev_run: bool = False,
)
Training defaults shared by examples and notebook runs.
Attributes:
| Name | Type | Description |
|---|---|---|
epochs |
int
|
Number of classifier training epochs for full reproduction. |
gan_epochs |
int
|
Number of conditional GAN training epochs. |
batch_size |
int
|
Classifier batch size. |
gan_batch_size |
int
|
Conditional GAN batch size. |
learning_rate |
float
|
Classifier Adam learning rate. |
gan_learning_rate |
float
|
Conditional GAN Adam learning rate. |
use_gan_augmentation |
bool
|
Whether to append synthetic GAN samples to the training split. |
gan_samples_per_class |
int
|
Number of interpolation samples generated for each ordered class pair in the GAN augmentation routine. |
seed |
int
|
Framework and data random seed. |
fast_dev_run |
bool
|
If |
ModelConfig
dataclass
#
ModelConfig(
channels: int = 22,
n_classes: int = 4,
max_time_step: int = 500,
dropout: float = 0.5,
cnn_filters: tuple[int, int, int, int] = (
25,
50,
100,
200,
),
cnn_kernel: tuple[int, int] = (10, 1),
lstm_units: tuple[int, int, int] = (32, 16, 8),
cnn_lstm_units: int = 10,
latent_dim: int = 128,
)
Model architecture defaults.
Attributes:
| Name | Type | Description |
|---|---|---|
channels |
int
|
Number of EEG channels. |
n_classes |
int
|
Number of classification targets. |
max_time_step |
int
|
Raw time samples used before preprocessing reduction. |
dropout |
float
|
Dropout probability used in CNN blocks. |
cnn_filters |
tuple[int, int, int, int]
|
Filters for the four convolutional blocks. |
cnn_kernel |
tuple[int, int]
|
Convolution kernel size for CNN-style classifiers. |
lstm_units |
tuple[int, int, int]
|
Hidden sizes for the stacked bidirectional LSTM classifier. |
cnn_lstm_units |
int
|
Hidden size for the CNN-LSTM recurrent layer. |
latent_dim |
int
|
Latent noise dimension used by conditional GAN components. |