-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
refactor: adapt to cut.prob's new handling of NULL in the C core (sim… #1574
Conversation
Current Aviator status
This PR is currently in state
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
5b76237
to
b0d4610
Compare
…pler default for the R interface)
mmh this does not work at all currently. |
@szhorvat actually, I think things are fine. What do you think of the tests rigraph/tests/testthat/test-motifs.R Line 1 in 30518c2
They're failing for small differences. Furthermore they do not make any sense to me, why are we testing for the value of the divisions?
|
I'm really tired today ... could you please help me by showing me a specific before/after example that changes output? Passing But as I'm writing this, I think I'm starting to remember what's going on: I think passing It'll be cleanest for each test to use its own random seed. |
Yes, this is certainly what's going on. If you pass The results are approximately the same and everything is fine. Adding a tolerance won't work very well here because the noise in the results is still quite high and will continue to be high unless we use large enough graphs and small enough cut probabilities that the computation time becomes too long for a test. |
The interface is not very nice, unfortunately, but improvements are for a later version and for the C core. If we give cut probabilities So, if you give |
When you resolve conflicts, be sure that you don't accidentally re-add |
I'll make a new PR, thank you!! |
…t.prob in a conditional, and keep a single call to the C function.""
@szhorvat would you mind re-reviewing? thank you! |
Errors in tests ══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-motifs.R:11:3'): motif finding works ─────────────────────────
c(mno0/mno, mno1/mno, mno2/mno) (`actual`) not equal to c(0.654821903845065, 0.666289144345659, 0.668393831285275) (`expected`).
`actual`: 0.67454 0.66614 0.66597
`expected`: 0.65482 0.66629 0.66839
── Failure ('test-motifs.R:19:3'): motif finding works ─────────────────────────
c(mno3/mno, mno4/mno, mno5/mno) (`actual`) not equal to c(0.443959957465819, 0.441952797125797, 0.446004870037941) (`expected`).
`actual`: 0.4417 0.4456 0.4405
`expected`: 0.4440 0.4420 0.4460
── Failure ('test-motifs.R:34:3'): motif finding works ─────────────────────────
m0/m (`actual`) not equal to c(...) (`expected`).
`actual[1:15]`: NA NA 0.672 NA 0.675 0.633 0.676 0.699 NaN 0.785 and 5 more...
`expected[1:15]`: NA NA 0.654 NA 0.654 0.612 0.658 0.630 NaN 0.538 ...
── Failure ('test-motifs.R:35:3'): motif finding works ─────────────────────────
m1/m (`actual`) not equal to c(...) (`expected`).
actual | expected
[1] NA | NA [1]
[2] NA | NA [2]
[3] 0.6665 - 0.6696 [3]
[4] NA | NA [4]
[5] 0.6663 - 0.6681 [5]
[6] 0.6327 - 0.7347 [6]
[7] 0.6685 - 0.6708 [7]
[8] 0.6712 - 0.6575 [8]
[9] NaN | NaN [9]
[10] 0.6000 - 0.7692 [10]
... ... ... and 5 more ...
── Failure ('test-motifs.R:36:3'): motif finding works ─────────────────────────
m2/m (`actual`) not equal to c(...) (`expected`).
actual | expected
[1] NA | NA [1]
[2] NA | NA [2]
[3] 0.66327 - 0.66645 [3]
[4] NA | NA [4]
[5] 0.66744 - 0.66529 [5]
[6] 0.65306 - 0.59184 [6]
[7] 0.66628 - 0.66668 [7]
[8] 0.65753 - 0.67123 [8]
[9] NaN | NaN [9]
[10] 0.66154 - 0.75385 [10]
... ... ... and 5 more ...
── Failure ('test-motifs.R:41:3'): motif finding works ─────────────────────────
m3/m (`actual`) not equal to c(...) (`expected`).
actual | expected
[1] NA | NA [1]
[2] NA | NA [2]
[3] 0.43906 - 0.44561 [3]
[4] NA | NA [4]
[5] 0.44174 - 0.44279 [5]
[6] 0.40816 - 0.44898 [6]
[7] 0.44432 - 0.44470 [7]
[8] 0.43836 - 0.42466 [8]
[9] NaN | NaN [9]
[10] 0.41538 - 0.36923 [10]
... ... ... and 5 more ...
── Failure ('test-motifs.R:43:3'): motif finding works ─────────────────────────
m4/m (`actual`) not equal to c(...) (`expected`).
actual | expected
[1] NA | NA [1]
[2] NA | NA [2]
[3] 0.43977 - 0.43925 [3]
[4] NA | NA [4]
[5] 0.44104 - 0.43928 [5]
[6] 0.22449 - 0.73469 [6]
[7] 0.43875 - 0.44509 [7]
[8] 0.53425 - 0.46575 [8]
[9] NaN | NaN [9]
[10] 0.43077 - 0.63077 [10]
... ... ... and 5 more ...
── Failure ('test-motifs.R:45:3'): motif finding works ─────────────────────────
m5/m (`actual`) not equal to c(...) (`expected`).
actual | expected
[1] NA | NA [1]
[2] NA | NA [2]
[3] 0.444436015 - 0.439985333 [3]
[4] NA | NA [4]
[5] 0.445736750 - 0.440288167 [5]
[6] 0.489795918 - 0.346938776 [6]
[7] 0.445353602 - 0.441597531 [7]
[8] 0.575342466 - 0.452054795 [8]
[9] NaN | NaN [9]
[10] 0.415384615 - 0.323076923 [10]
... ... ... and 3 more ...
── Error ('test-motifs.R:54:3'): sample_motifs works ───────────────────────────
Error in `sample_motifs(g)`: At vendor/cigraph/src/misc/motifs.c:604 : The number of vertices to use as a sample for motif count estimation must be at least one, got 0. Invalid value
Backtrace:
▆
1. └─igraph::sample_motifs(g) at test-motifs.R:54:3
[ FAIL 9 | WARN 0 | SKIP 5 | PASS 5059 ]
Error: Test failures
Execution halted |
there's a second PR which I had forgotten |
I assume you don't need a re-review on the 2nd PR. If you still need one, please ping me there. |
…pler default for the R interface)
Fix #1570
Work needed in the tests.