-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add random_state #147
Add random_state #147
Conversation
I don't understand the coverage report:
|
@mbillingr can you take a look at cbrnr@c83eb5b - I've disabled two tests in this function because I have no idea what they do. Also the last line in the test raised an error related to the eigenvalue decomposition (see Travis log in the previous commit) - I think not only is the input data linearly dependent(?), but there is also no |
Either I'm completely blind or there really is a problem with |
921c8ee
to
3188160
Compare
I guess that's all - do you see anything I forgot? |
Furthermore, what's up with Travis? |
@@ -59,7 +59,7 @@ def csp(x, cl, numcomp=None): | |||
sigma2 += np.cov(x2[t, :, :]) / x2.shape[0] | |||
sigma2 /= sigma2.trace() | |||
|
|||
e, w = eig(sigma1, sigma1 + sigma2, overwrite_a=True, overwrite_b=True, check_finite=False) | |||
e, w = eigh(sigma1, sigma1 + sigma2, overwrite_a=True, overwrite_b=True, check_finite=False) |
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.
How is this change related to the random state?
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.
It's not :-). But when I stumbled over it, I thought it had to be changed.
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.
Hehe, ok, but now we have to pollute this PR by discussing why this is necessary.
Why is it necessary? :)
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.
Because we're dealing with Hermitian matrices. If our matrices are not Hermitian, this indicates a problem with our covariance matrices (e.g. due to a lack of data and/or no regularization). In such cases, eigh
fails and tells us that something is wrong. eig
on the other hand silently produces complex eigenvalues, which we usually ignored. For example, there was a problem with one test case, which generated a sine as input signal.
What about travis? |
It's working now. I guess it was related to a However, I don't understand why Travis doesn't trigger Coveralls anymore. Any ideas?
Yes, it was related. Since I added |
The builds show up on the coveralls page, so I guess the problem is related to coveralls, not to travis. Otherwise I have no idea, yet.
I understand. |
Btw,
The baseline is the current master. At the bottom of the report (coveralls page) it links to the baseline commit. |
@mbillingr can you check if we've caught all randomness? And if so, please feel free to merge. |
Can you rebase? |
Yup. Done. |
Fixes #139.
So far, MVARICA supports the
random_state
argument. I'll add the other functions soon. In the meantime, please let me know if my changes are OK @mbillingr.