snap-stanford / snap

Stanford Network Analysis Platform (SNAP) is a general purpose network analysis and graph mining library.
Other
2.17k stars 797 forks source link

Temporal Motif Negative Couting #115

Closed ernaneluis closed 7 years ago

ernaneluis commented 7 years ago

I ran the temporal motif over a 285MB temporal graph input Following this Sample:

3607 3607 1
465 465 2
64 64 3
64 64 3
64 64 4
64 64 5
64 64 5
64 64 6
64 64 6
64 64 6
64 64 6
64 64 7
64 64 7
465 465 8
465 465 8
465 465 8
465 465 8
465 465 8
465 465 9
465 465 9
64 64 10
465 465 11
64 64 12
465 465 13
465 465 13
465 465 13
465 465 13
465 465 13
465 465 14
64 64 15
64 64 15
64 64 15
64 64 15
64 64 15
64 64 15
64 64 16
64 64 16
465 465 17
465 465 17
465 465 17
465 465 17
64 64 18
465 465 19
465 465 20
465 465 20
465 465 20
......
Temporal File: lt_temporal-graph.txt
Temporalmotifs. build: 22:36:14, Aug 22 2017. Time: 13:14:57 [Aug 22 2017]
==========================================================================
Input directed temporal graph file (-i:)=lt_temporal-graph.txt
Output file in which to write counts (-o:)=lt_temporal-graph-counts.txt
Time window delta (-delta:)=4096
Number of threads for parallelization (-nt:)=4

run time: 8.70s (13:15:06)
View: lt_temporal-graph-counts.txt

and as return I got negative values on the count matrix:

-890358199 -1733894304 1125470579 799601589 76019207 1038247705
670728603 -1946877382 792063026 -358639051 -496237993 -145842823
-227668203 1733425210 -635396742 -129060194 556222443 1173928997
-304544887 -227668203 1853557012 1342819116 -890992610 -332151224
-1364274173 1289216023 439550572 -1236465289 -1955757062 -2144089474
1505960219 -812639587 871622945 -147126221 -1547156996 -802570397

Why this happened? Is this a bug?

roks commented 7 years ago

SNAP uses 32-bit signed values, I suspect that the counts are larger 31-bits.