Hi
I have a matrix, I want to know which rows of first column has data , and if first row has data I check the other columns to have a data.
m= 1 0 0 1
0 1 1 0
1 1 1 0
in this matrix, the first column has 2 data, first and third rows. At this time I see the other column in frist row and I get that third column has data, I compute Jaccard similarity for first and third rows
Loading
VulpesPosted Aug 30, 2013, 2:58 PM
diamond diamondPosted Aug 30, 2013, 1:49 PM
But my matrix is created as below, I save src IP addresses in every time window, rows are src Ip address and columns are time window.
int[,] Failure_matrix = new int[5, size];
I want to know which src ip addresses are seen in current time window(be 1 in matrix), it is saved in first column of matrix. my Jaccard similarity is different from what is you have written, I want acquire intersect of src ip address are 1 in current time window with other time windows (columns). I mean, if I see one src ip is 1 in current time window, I see the others time windows that this src ip was 1 and other src ipadddres that time window are 1, then I compute their union and intersect by Jaccard
VulpesPosted Aug 30, 2013, 12:21 PM
I've only dealt with the case where 2 rows contains data in the first column as I wasn't sure what to do in other scenarios.
Note that it's convenient here to express the matrix as a jagged array even though the lengths of all the rows are, of course, the same. This is because one can easily extract a whole row from the jagged array: