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

test_variance_weight fails #1

Open
ohadle opened this issue Jan 30, 2019 · 1 comment
Open

test_variance_weight fails #1

ohadle opened this issue Jan 30, 2019 · 1 comment
Assignees

Comments

@ohadle
Copy link

ohadle commented Jan 30, 2019

10/11 unit tests pass, but this one fails:

Failure
Traceback (most recent call last):
  File "C:\Users\ohadl\AppData\Local\Continuum\anaconda3\lib\unittest\case.py", line 59, in testPartExecutor
    yield
  File "C:\Users\ohadl\AppData\Local\Continuum\anaconda3\lib\unittest\case.py", line 615, in run
    testMethod()
  File "C:\Users\ohadl\repos\PythonUtils\test\roc_comparison\test.py", line 133, in test_variance_weight
    numpy.testing.assert_allclose(variances.mean(), aucs.var(), rtol=0.1)
  File "C:\Users\ohadl\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\testing\_private\utils.py", line 1452, in assert_allclose
    verbose=verbose, header=header, equal_nan=equal_nan)
  File "C:\Users\ohadl\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\testing\_private\utils.py", line 789, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Not equal to tolerance rtol=0.1, atol=0

(mismatch 100.0%)
 x: array(0.013752)
 y: array(0.017002)

Not sure what the implications are.

@kazeevn kazeevn self-assigned this Jan 23, 2021
@kazeevn
Copy link
Contributor

kazeevn commented Jan 23, 2021

Unfortunately, the implications are that the math for the error in the weighted case is more difficult, simply adding weights to the fast DeLong algorithm, like I did here, is incorrect. If there is a paper on the issue, I'd much appreciate it. Meanwhile, I'll clean the master branch from the weighted code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants