New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance 'lwf', 'mcd', 'oas' and 'sch' covariance estimator to process complex inputs #274
Enhance 'lwf', 'mcd', 'oas' and 'sch' covariance estimator to process complex inputs #274
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks for this contribution which solves a crucial issue!
pyriemann/utils/covariance.py
Outdated
if not is_real_type(X): | ||
raise ValueError("Input must be real-valued.") | ||
iscomplex = np.iscomplexobj(X) | ||
if iscomplex: | ||
X = np.concatenate((X.real, X.imag), axis=0) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sylvchev , do you think that sch
estimator could be easily generalized to complex-valued input?
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
add decorator, revert changes to m estimators revert list comprehensions
Thank you for the suggestions, @qbarthelemy and @agramfort. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qbarthelemy I let you merge if happy
thx @gabelstein
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx @gabelstein for this great improvement !
As noted in #204, this implements general complex covariance estimation described here.
I put the transformation in the individual estimators like _oas, _lwf etc., that made most sense to me.
What do you thin, @qbarthelemy?