-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
test(kernelcpd): exhaustive test for kernelcpd #108
Conversation
Codecov Report
@@ Coverage Diff @@
## master #108 +/- ##
==========================================
+ Coverage 92.77% 95.12% +2.34%
==========================================
Files 41 41
Lines 955 964 +9
==========================================
+ Hits 886 917 +31
+ Misses 69 47 -22
Continue to review full report at Codecov.
|
I modified the tests for the detection part in order to take into account the
|
As for the runtime warnings and the |
…onstant signal input
To be checked but all the problems raised above might be solved. |
To me, this is the correct behaviour: on constant signals, the returned list should be [n_samples] |
This is because it computes the inverse of the variance (so 1/0 because the signal is constant). To me, this is a normal behaviour that we should let as is. EDIT: oh ok, I should have read your last comment. |
I do not think that modifying the search method is the correct answer to this issue, because this problems really is about _, val = slogdet(cov)
if np.isinf(val) and val<0:
return 0 |
I will chek what is the behaviour of search methods (other than windows) on constant signals. |
I do not think it would work, methodologically speaking. Here is an example where the result of such a implementation would be false : X = np.ones((100,1))
X[52] = 1.5
my_normal_cost = CostNormal().fit(X)
error_constant = my_normal_cost.error(0, 50)
error_non_constant = my_normal_cost.error(50, 100) We would end up with WDYT ? |
you are right, good catch. Then your solution is clearly the best one. |
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.
LGTM
No description provided.