# CSP Errors

**URL:** <https://mne.discourse.group/t/csp-errors/1243>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [June 18, 2017, 11:29am UTC](https://mne.discourse.group/t/csp-errors/1243 "2017-06-18T11:29:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [June 18, 2017, 11:29am UTC](https://mne.discourse.group/t/csp-errors/1243/1 "2017-06-18T11:29:31Z")

</div>

Hi,

When I try to run the CSP classifier on my data, I come up with an error  
saying

LinAlgError: the leading minor of order 105 of 'b' is not positive  
definite. The factorization of 'b' could not be completed and no  
eigenvalues or eigenvectors were computed.

I was wondering what might be the error that is causing this, and how I  
could fix this.

Thanks,  
Aditya Singh  
Biomedical Engineer  
UT Austin  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20170618/3a1625dd/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170618/3a1625dd/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [June 18, 2017, 12:40pm UTC](https://mne.discourse.group/t/csp-errors/1243/2 "2017-06-18T12:40:29Z")

</div>

Hi,

This is because your data are rank deficient. you should add regularization  
to avoid this error.  
you can set the parameter reg='oas' of the CSP, and it should works.

Alex
