I have this problem in calculating Jaccard Similarity for finding similar books using transaction id from MySQL database of sales transactions :
t1= Java,Ruby,C
t2= Java,C#, Python
t3= C#, VB, C
....etc
Size of Java intersection = 2; (How could we find it out?)
Size of union = 3, (How could we find it out?)
Jaccard similarity = (intersection/union) = 2/3
But I don't understand how could I find out the "intersection" and "union" of the two vectors or how to implement it in Java/JSP.
Please help me and thanks a lot!