# Decoding - Extract spatial patterns for each condition

**URL:** <https://mne.discourse.group/t/decoding-extract-spatial-patterns-for-each-condition/11233>\
**Category:** Support & Discussions\
**Tags:** machine-learning\
**Created:** [May 27, 2025, 10:04am UTC](https://mne.discourse.group/t/decoding-extract-spatial-patterns-for-each-condition/11233 "2025-05-27T10:04:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CamilleFakche](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/camillefakche/32/3209_2.png) [@CamilleFakche](https://mne.discourse.group/u/CamilleFakche)\
**Post date:** [May 27, 2025, 10:04am UTC](https://mne.discourse.group/t/decoding-extract-spatial-patterns-for-each-condition/11233/1 "2025-05-27T10:04:26Z")

</div>

- MNE version: 1.9.0
- Python: 3.13
- Operating system: macOS 15.5

Hi MNE community,

Using MNE tutorials, I have been able to extract the spatial patterns and filters (MEG) allowing to separate my conditions A vs B in decoding analysis.  
([Linear classifier on sensor data with plot patterns and filters — MNE 1.9.0 documentation](https://mne.tools/stable/auto_examples/decoding/linear_model_patterns.html#decoding-in-sensor-space-using-a-logisticregression-classifier))

I would like to extract the spatial patterns associated with condition A and B independently.  
Is there a way to do it?

Thank you,  
Camille.

---

<div class="post-metadata">

**Author:** ![wmvanvliet](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/wmvanvliet/32/100_2.png) [@wmvanvliet](https://mne.discourse.group/u/wmvanvliet)\
**Post date:** [May 29, 2025, 6:34pm UTC](https://mne.discourse.group/t/decoding-extract-spatial-patterns-for-each-condition/11233/2 "2025-05-29T18:34:58Z")

</div>

If you train a model to choose between A or B then it learns a filter (and hence a pattern) that represents the difference between A and B (A - B if you will). In this case, there is no spatial pattern for condition A and B independently.
