braindecode.modules.aggregate_probas#
- braindecode.modules.aggregate_probas(logits, n_windows_stride=1)[source]#
Aggregate predicted probabilities with self-ensembling.
Aggregate window-wise predicted probabilities obtained on overlapping sequences of windows using multiplicative voting as described in [Phan2018].
- Parameters:
logits (np.ndarray) – Array of shape (n_sequences, n_classes, n_windows) containing the logits (i.e. the raw unnormalized scores for each class) for each window of each sequence.
n_windows_stride (int) – Number of windows between two consecutive sequences. Default is 1 (maximally overlapping sequences).
- Returns:
Array of shape ((n_rows - 1) * stride + n_windows, n_classes) containing the aggregated predicted probabilities for each window contained in the input sequences.
- Return type:
np.ndarray
References
[Phan2018]Phan, H., Andreotti, F., Cooray, N., Chén, O. Y., & De Vos, M. (2018). Joint classification and prediction CNN framework for automatic sleep stage classification. IEEE Transactions on Biomedical Engineering, 66(5), 1285-1296.