braindecode icon indicating copy to clipboard operation
braindecode copied to clipboard

Exponential_running_standardize bug

Open konspatl opened this issue 6 years ago • 3 comments

Greetings,

I think there's a bug on the "exponential_running_standardize" method in datautil. In the case where there's an init_block_size, the axis of computing the 'init_mean' and 'init_std' is wrong (other_axis gives value 1, although it should be axis=0), as we want to compute the mean and std with respect to time samples, not channels. Although the dimensionality is wrong, the matrix subtraction and division is still possible, which gives wrong results for the init_block_size.

konspatl avatar Jul 26 '19 13:07 konspatl

Thanks, is the issue still there in new braindecode at https://github.com/braindecode/braindecode/blob/41a216572f08ef23fd0af47e10e89bc9179cce5e/braindecode/datautil/preprocess.py#L113-L162 ?

robintibor avatar May 15 '20 10:05 robintibor

Yes, it seems so. It's not a significant issue, as it only affects the initial block.

By replacing other_axis with 0 (instead of 1), everything should work fine.

Best regards

konspatl avatar May 16 '20 18:05 konspatl

hm indeed you are very correct. will correct in new braindecode.

robintibor avatar May 16 '20 20:05 robintibor