Skip to content

BUG: Correct thresholding in correlation tools - #6105

Merged
bashtage merged 1 commit into
statsmodels:masterfrom
astyonax:patch-1
Aug 19, 2019
Merged

bashtage merged 1 commit into
statsmodels:masterfrom
astyonax:patch-1

Conversation

@astyonax

Copy link
Copy Markdown
Contributor

if I understood well this function
the variable clipped should report if any value was smaller than the threshold value not the hardcoded 0

Sorry that I cannot run the tests now. Later next week in case.

if I understood well this function 
the variable `clipped` should report if any value was smaller than the threshold value not the hardcoded 0
@codecov

codecov Bot commented Aug 16, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #6105 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6105   +/-   ##
=======================================
  Coverage   84.05%   84.05%           
=======================================
  Files         613      613           
  Lines       97604    97604           
  Branches    10659    10659           
=======================================
  Hits        82040    82040           
  Misses      13140    13140           
  Partials     2424     2424
Impacted Files Coverage Δ
statsmodels/stats/correlation_tools.py 90.59% <100%> (ø) ⬆️

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 a9c2a9c...8a5b958. Read the comment docs.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 86.536% when pulling 8a5b958 on astyonax:patch-1 into a9c2a9c on statsmodels:master.

def clip_evals(x, value=0): # threshold=0, value=0):
evals, evecs = np.linalg.eigh(x)
clipped = np.any(evals < 0)
clipped = np.any(evals < value)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is a legitimate bug. @josef-pkt

@bashtage

Copy link
Copy Markdown
Member

Not tested, but fix is obviously correct.

Thanks.

@bashtage
bashtage merged commit b5f8b2d into statsmodels:master Aug 19, 2019
@astyonax
astyonax deleted the patch-1 branch August 20, 2019 07:18
@astyonax

Copy link
Copy Markdown
Contributor Author

Great! thank you!

bashtage added a commit to bashtage/statsmodels that referenced this pull request Nov 22, 2019
@bashtage bashtage removed the backport label Nov 22, 2019
@bashtage bashtage changed the title Update correlation_tools.py BUG: Correct thresholding in corrrelation tools Dec 17, 2019
@bashtage bashtage added this to the 0.11 milestone Dec 18, 2019
@bashtage bashtage changed the title BUG: Correct thresholding in corrrelation tools BUG: Correct thresholding in correlation tools Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants