meeg-ml-benchmarks / brain-age-benchmark-paper

M/EEG brain age benchmark paper
https://meeg-ml-benchmarks.github.io/brain-age-benchmark-paper/
BSD 3-Clause "New" or "Revised" License
24 stars 10 forks source link

Adaptive Average Pooling for Cropped Decoding? #25

Closed robintibor closed 3 years ago

robintibor commented 3 years ago

Have one suggestion how cropped decoding may be implementable in an easy way, and also some changes to model hyperparameters to make the version the same that I used in pathology detection

https://github.com/dengemann/meeg-brain-age-benchmark-paper/blob/1204bfda96c8f65c7067f705e5de1c844dea8b87/deep_learning_utils.py#L279-L284

model = ShallowFBCSPNet( 
     in_chans=n_channels, 
     n_classes=1, 
     input_window_samples=None, 
     final_conv_length=35, 
 ) 

https://github.com/dengemann/meeg-brain-age-benchmark-paper/blob/1204bfda96c8f65c7067f705e5de1c844dea8b87/deep_learning_utils.py#L289-L293

model = Deep4Net(
    in_chans=n_channels,
    n_classes=1, 
    input_window_samples=None,
    final_conv_length=1,
    stride_before_pool=True,
)

https://github.com/dengemann/meeg-brain-age-benchmark-paper/blob/1204bfda96c8f65c7067f705e5de1c844dea8b87/deep_learning_utils.py#L299-L303

new_model.add_module("global_pool", nn.AdaptiveAvgPool1d(1))
new_model.add_module("squeeze2", Expression(squeeze_final_output))

Something like this may work without any further changes

gemeinl commented 3 years ago

I will implement cropped decoding as you suggested and add a flag to switch from trialwise to cropped mode for hyperparameter optimization.