-
Notifications
You must be signed in to change notification settings - Fork 1
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
Switched inverse function to run pseudo-inverse, to account for correlated and 0 variance variables #5
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5 +/- ##
==========================================
+ Coverage 96% 96.55% +0.55%
==========================================
Files 1 1
Lines 50 58 +8
==========================================
+ Hits 48 56 +8
Misses 2 2
Continue to review full report at Codecov.
|
… integration speed
series = Kruskals.Kruskals(ndarr, arr).driver_score() | ||
|
||
assert series[1] == 0.0 | ||
assert series[4] == 0.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.
New line at end of file
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.
@@ -121,3 +121,26 @@ def test_that_direction_is_applied_on_directional_drivers_analysis(): | |||
series = Kruskals.Kruskals(ndarr, arr).driver_score_to_series(True) | |||
|
|||
assert (series.values < 0).any() | |||
|
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.
Also I think this should be a double newline
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.
Not given that the others aren't. We can correct in a different PR if you feel strongly
#whitespacepolice |
b20cd92
to
7dfc164
Compare
Switched to pinv from inv
https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.pinv.html
It uses:
https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_pseudoinverse
With thanks to @jhofmeyr