Skip to content
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

Merged
merged 7 commits into from
May 3, 2017

Conversation

Rambatino
Copy link
Owner

@Rambatino Rambatino commented May 2, 2017

@codecov-io
Copy link

codecov-io commented May 2, 2017

Codecov Report

Merging #5 into master will increase coverage by 0.55%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #5      +/-   ##
==========================================
+ Coverage      96%   96.55%   +0.55%     
==========================================
  Files           1        1              
  Lines          50       58       +8     
==========================================
+ Hits           48       56       +8     
  Misses          2        2
Impacted Files Coverage Δ
Kruskals/kruskals.py 96.55% <100%> (+0.55%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c89f5e3...7dfc164. Read the comment docs.

series = Kruskals.Kruskals(ndarr, arr).driver_score()

assert series[1] == 0.0
assert series[4] == 0.0
Copy link
Collaborator

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

Copy link
Owner Author

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()

Copy link
Collaborator

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

Copy link
Owner Author

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

@xulaus
Copy link
Collaborator

xulaus commented May 3, 2017

#whitespacepolice

@Rambatino Rambatino force-pushed the bugfix/handle_all_zeros branch from b20cd92 to 7dfc164 Compare May 3, 2017 11:40
@Rambatino Rambatino merged commit c8a8d0c into master May 3, 2017
@Rambatino Rambatino deleted the bugfix/handle_all_zeros branch May 3, 2017 11:41
@Rambatino Rambatino changed the title Added code and spec to remove 0 variance values before running Kruskals Switched inverse function to run pseudo-inverse, to account for correlated and 0 variance variables May 7, 2017
@Rambatino Rambatino added the bug label May 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants