SlideShare una empresa de Scribd logo
1 de 30
Descargar para leer sin conexión
Local Sensitive Hashing &
Minhash on Facebook friend
links data & friends
recommendation
Chengeng Ma
Stony Brook University
2016/03/05
1. What is Local Sensitive Hash & Minhash?
• If you are familiar with LSH and Minhash, please directly go to
page 12, because the following pages are just fundamental
knowledge about this topic, which you can find more details in
the book, Mining of Massive Dataset, written by Jure Leskovec,
Anand Rajaraman and Jeffrey D. Ullman.
What is LSH &
Minhash about?
• Local Sensitive Hash (LSH) &
Minhash are two profoundly
important methods in Big Datafor
finding similar items.
• In Amazon, if you can find two
similar persons, you can
recommend to one person the
items the other has purchased.
• For Google, Baidu, …, users always
hope the search engine can find
pictures similar to the one they
have uploaded.
Calculating similarity between each pair is a
lot of computation (Why LSH?)
• If you have 106 items within your
data, you will need almost
0.5 × 1012
times computation to
know the similarities between each
pair.
• You will need to parallel a lot of
tasks to deal with this huge
computation amount.
• You can do this with the help of
Hadoop, but you can do better
with the help of LSH & Minhash.
• The LSH can hash one item to a bucket
based on the feature list that item has.
• If two items are quite similar with each
other in their feature lists, then they
will have a large probability to be
hashed into the same bucket.
• You can amplify this effect to different
extent by setting parameters.
• Finally, you only need to compute
similarities for the pairs formed by the
items within the same bucket.
How Minhash
comes in?
• The LSH needs you keep
the feature list of each
item in the format like a
matrix (the sequence is
important).
• If the size of universal set
is fixed or small, e.g., the
fingerprint array, then LSH
alone can work well.
1st column
represents the
items person S1
has purchased.
1st row
represents who
has purchased
item a.
How Minhash comes in?
• Jaccard Similarity = 2/7
• However, if the universal set is
large or not size-fixed, e.g., items
purchased by each account,
friend list on social network, …
• Then formatting the dataset into
matrix is not efficient, since the
dataset is usually very sparse.
• Then Minhash works, if the
similarities between two feature
lists is calculated as Jaccard
similarities.
What’s
Minhash value?
• Permute the original
matrix by row.
• For each column (set), the
1st non-empty element’s
row index is the minhash
value of that column.
Original matrix
Permute to a
different order:
b, e, a, d, c.
H(S1)=a, H(S2)=c, H(S3)=b, H(S4)=a.
Minhash’s property (similarity preserved):
• 3 kinds of rows between set 𝑆 𝑎 & 𝑆 𝑏:
(x): both sets have 1;
(y): one has 1, the other has 0;
(z): both sets have 0.
𝐽 𝑎𝑏 =
|𝑋|
𝑋 + |𝑌|
Pr ℎ 𝑆 𝑎 = ℎ 𝑆 𝑏 =
|𝑋|
𝑋 + |𝑌|
• If you do 100 times different
minhash, you reduce one
dimension of the matrix from
unknown large to 100.
• The probability that two sets
share the same minhash value
equals the Jaccard similarity
between them.
Pr ℎ 𝑆 𝑎 = ℎ 𝑆 𝑏 = 𝐽 𝑎𝑏
Permutations can be simulated by hash functions
• For j th column in original
matrix, find all the non-empty
elements, try to input their
indexes into the i th hash
function, the minimum output
is the element SIG(i, j).
• Hash function: 𝑎 ∗ 𝑥 + 𝑏 % 𝑁 :
• where N is a prime, equal to or slightly
larger than the size of universal set (# of
rows of original matrix),
• a & b must be integers within [1, N-1].
• The result signature matrix, where
row index is for hash functions,
column index is for sets.
For example, we use 2 hash functions to simulate 2
permutations: (x+1)%5 and (3x+1)%5, where x is row index
SIG
Now you have signature matrix, you use it
instead of original matrix to do LSH.
• Divide the signature matrix into b
bands, each of which has r rows.
• For each band range, build an
empty hashtable, hash each
column (portion within the band
range) into a bucket, so that only
identical bands are hashed into
the same bucket.
• Columns within the same bucket
are considered candidates that
you should form pairs and
calculate similarities.
• Take the union of different band
ranges and filter out the false
positives.
Jaccard
Similarity
Probability
of becoming
a candidate
Why LSH works? --- the
amplification effects
2. Details of my class project: dataset
• User-to-user links from Facebook
New Orleans networks data.
• The data is created by Bimal
Viswanath et al. and used for their
paper On the Evolution of User
Interactionin Facebook.
• It can be download in
http://socialnetworks.mpi-
sws.org/data/facebook-links.txt.gz
• It has 63,731 persons and 1,545,686
links, 10.4 MB in size.
• The data is not large, but as a
training, I will use Hadoop during this
project.
My class project plan:
• Firstly find similar persons based
on users’ friend lists, where LSH
and Minhash will be implemented
in Hadoop.
• The similar persons are called
“close friend” in this project.
• Then recommend to you the
persons who are friends of your
close friend but not yet of you.
• It generally sounds like
Collaborative Filtering.
• Two persons who have similar
friend list are considered “close
friends”, since they must have some
relationship in the real world, e.g.,
schoolmates, workmates,
teammate, …
• If you’re good friend of someone,
you may like to know more of
his/her friend.
• We do not set too high threshold
for similarity, since finding a
duplicate of you is not interesting.
Why not just use
common friend counts?
• The classicalway is based on
number of common friends.
• However, there are some persons
who have a lot of common friends
with you, but has nothing to do
with you, e.g., celebrities, politics,
salesmen who want to sell their
stuff through social network, or
even swindlers…
• People use social network to find
friends that can physically reach
them, but not for persons too far
away from them.
• Most of my friends may like a pop
singer and become friends of him.
Based on common friends, system
will recommend that pop singer to
me.
• But the pop singer can never
remember me, since he has
millions of friends on site.
Prepare work:
• 1. Make data into
the format like
below, where j
represents the j th
person, Pj is a list of
friends of person j.
• 2. In this study, 63731 is both the number of sets to
compare and the size of universal element set.
Because both the key j and the elements within set Pj
are user id.
1: P1
2: P2
… …
n: Pn
• 3. 63731 is not a prime (101*631). Only prime
number can simulate true permutations. We use
63737 instead, equivalent to adding 6 persons that
has no friends online.
• 4. Hash function for Minhash:
N=63737L; hashNum=100;
private long fhash ( int i, long x ) {
return 13 + 𝑥 − 1 ∗ (
𝑁∗𝑖
3∗ℎ𝑎𝑠ℎ𝑁𝑢𝑚
+ 1) %𝑁 ;
}
1 ≤ 𝑥 ≤ 𝑁, 0 ≤ 𝑖 ≤ ℎ𝑎𝑠ℎ𝑁𝑢𝑚 − 1
Pseudocode of Minhash (Map job only)
• Mapper input: (c, Pc), where Pc
represents a list [ j1, j2, …, js ];
• Build a new array s[hashNum]
(hashNum=100here), initialized as
infinity everywhere.
• For i th hash function, each
element jj in Pc is an opportunity to
get lower hash value, finally the
minimum hash value from all jj is
the minhash in SIG[i,c].
• Output c as key, the content of
array s as value.
input (c, Pc), where Pc= [ j1, j2, …, js ]
long[] s = new long[hashNum];
for 0 ≤ 𝑖𝑖 ≤ ℎ𝑎𝑠ℎ𝑁𝑢𝑚 − 1:
s[ii] = infinity;
end
for jj in [ j1, j2, …, js ]:
for 0 ≤ 𝑖𝑖 ≤ ℎ𝑎𝑠ℎ𝑁𝑢𝑚 − 1:
s[ii] = min (s[ii], fhash(ii, jj));
end
End
Output (c, array s);
Pseudocode for LSH:
• Mapper input (j, 𝑆𝑗), where 𝑆𝑗 is
the j th column of signature matrix.
• Split array 𝑆𝑗 into B bands as, 𝑆𝑗1,
𝑆𝑗2, …, 𝑆𝑗𝐵.
• For b th band, get its hash value
stored in myHash.
• Output the tuple (b, myHash) as
key, j as value.
for 1 ≤ 𝑏 ≤ 𝐵:
myHash = getHashValue(𝑆𝑗𝑏)
Output { ( b, myHash ), j }
end
• Reducer input:
{ (b, aHashValue), [𝑗1, 𝑗2, …, 𝑗 𝑝] }
Now, form pairs between 𝑗1, …,
𝑗 𝑝and output as candidate pairs.
for 1 ≤ 𝑥 ≤ 𝑝 − 1:
for 𝑥 + 1 ≤ 𝑦 ≤ 𝑝:
output (𝑗 𝑥, 𝑗 𝑦)
end
end
One more program is needed to remove duplicates.
Hadoop’ssorting procedure helps us gathering
all the items that both has the same hash
value and comes from the same band range.
Hash function for LSH:
• The LSH needs to hash a band
portion of vector into a value.
• It hopes only identical vectors
can be hashed into the same
bucket.
• An easy way is to directly use its
string expression, since Hadoop
also uses Text to transport data.
• For example, hash the below
portion into string:
• In this way, only exactly same
vector portion can comes into the
same bucket.
“21,14,36,55”
Hash to
string
Parameters set:
• We do not want to set threshold
of similarity too high, since
finding a duplicate of you on
web is not interesting.
• So we set the threshold of
similarity near 0.1.
• We set B=50 and hashNum=100,
so that each band in LSH has R=2
rows.
𝑃 𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 𝑥) = 1 − (1 − 𝑥 𝑅
) 𝐵
• S curve grows quickly:
• X=0.1, P=0.39
• X=0.15, P=0.68
• X=0.2, P=0.87
B=50, R=2
Result Test:
• 𝑃 𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 𝑥) =
𝑃(𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 & 𝑥≤𝑠<𝑥+𝑑𝑥)
𝑃(𝑥≤𝑠<𝑥+𝑑𝑥)
• 𝑃 𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 𝑥) = 1 − (1 − 𝑥 𝑅) 𝐵
• The Hadoop output can be analyzed to get
𝑃(𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 & 𝑥 ≤ 𝑠 < 𝑥 + 𝑑𝑥).
• For 𝑃(𝑥 ≤ 𝑠 < 𝑥 + 𝑑𝑥), another Hadoop program is written
to really calculatethe similarities within all possible pairs
(which takes N(N-1)/2times computation),since the dataset
is not too large.
• But only the similarities equal to or larger than 0.1 is stored
in output file, because it takes several Terabytes to store all
the similarities.
𝑃 𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 𝑥) derived from real dataset
(blue) and the theoretical curve (red)
Histogram of LSH recommended pairs and all
existing pairs (but cut at 0.1) within the data
Statistics
• The LSH & Minhash
recommends 1,065,318 pairs.
• There are 660,334 existing
pairs that really have s larger
than 0.1.
• Intersection of them have
429,176 pairs, which contains
65% of similar pairs (s>0.1).
• But the computation is
hundreds of times faster than
before.
• 1 − (1 − 𝑥 𝑅
) 𝐵
) =
𝑃(𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 & 𝑥≤𝑠<𝑥+𝑑𝑥)
𝑃(𝑥≤𝑠<𝑥+𝑑𝑥)
• We define a reference value 𝑥 𝑅𝑒𝑓:
• 1 − (1 − 𝑥 𝑅𝑒𝑓
𝑅
) 𝐵
)=
0.1
1
𝑃 𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 & 𝑥 ≤ 𝑠 < 𝑥 + 𝑑𝑥 𝑑𝑥
0.1
1
𝑃(𝑥 ≤ 𝑠 < 𝑥 + 𝑑𝑥) 𝑑𝑥
= 429176/660334 = 0.649938
Take in parameters B=50, R=2
𝑥 𝑅𝑒𝑓 = 0.1441 , which is slightly above 0.1
How to calculate 𝑃(𝑥 ≤ 𝑠 < 𝑥 + 𝑑𝑥)?
(Similarity Joins Problem)
• To get the exact P.D.F., you need
to really calculate the similarities
for all N(N-1)/2 pairs.
• Using Hadoop can parallel and
speed up. But don’t use too high
replicate rate.
• How about the right hand side
method?
Mapper input: (i, Pi)
for 1 ≤ j ≤N:
if i < j: output {(i, j),Pi}
else if i > j: output {(j, i), Pi}
end
Reducer input: { (i, j), [Pi, Pj] }
Output { (i, j), Sij }
• This method takes replicate rate as N and will definitely
fail. The correct way is to split persons into G groups.
The correct way to get similarities between all
pairs by Hadoop.
• Mapper input: (i, Pi)
• Determine its group number as
u=i%G, where G is the number
of groups you split, it is also the
replicate rate.
• For 0 ≤ v ≤G-1:
• If u < v: Output { (u, v), (i, Pi) }
• Else if u>v: Output { (v, u), (i, Pi) }
• end
• Reducer input:
• { (u, v), [∀ 𝑖, 𝑃𝑖 ∈ 𝐺𝑟𝑜𝑢𝑝 𝑢,
∀ 𝑗, 𝑃𝑗 ∈ 𝐺𝑟𝑜𝑢𝑝 𝑣] }
• Create two empty list uList &
vList, separately to gather all
𝑖, 𝑃𝑖 that belongs to group u
and v.
For 0 ≤ 𝛼 ≤ 𝑠𝑖𝑧𝑒 𝑢𝐿𝑖𝑠𝑡 − 1:
Get i and Pi from 𝑢𝐿𝑖𝑠𝑡[𝛼]
For 0 ≤ 𝛽 ≤ 𝑠𝑖𝑧𝑒 𝑣𝐿𝑖𝑠𝑡 − 1:
Get j and Pj from 𝑣𝐿𝑖𝑠𝑡[𝛽]
If i<j: output { (i, j), Sij }
Else if i>j: output { (j, i), Sij }
v
Continued
in the next
page
Still within the reducer:
• The above only consider pairs
whose element comes from
different groups.
• Now we consider elements
within the same group.
• We manage to avoid calculate
the same pairs multiple times by
setting if conditions.
If v==u+1:
For 0 ≤ 𝛼 ≤ 𝑠𝑖𝑧𝑒 𝑢𝐿𝑖𝑠𝑡 − 2:
Get i and Pi from 𝑢𝐿𝑖𝑠𝑡[𝛼]
For 𝛼 + 1 ≤ 𝛽 ≤ 𝑠𝑖𝑧𝑒 𝑢𝐿𝑖𝑠𝑡 − 1:
Get j and Pj from 𝑢𝐿𝑖𝑠𝑡[𝛽]
If i<j: output { (i, j), Sij }
Else if i>j: output { (j, i), Sij }
If u==0 & v==G-1:
For 0 ≤ 𝛼 ≤ 𝑠𝑖𝑧𝑒 𝑣𝐿𝑖𝑠𝑡 − 2:
Get i and Pi from 𝑣𝐿𝑖𝑠𝑡[𝛼]
For 𝛼 + 1 ≤ 𝛽 ≤ 𝑠𝑖𝑧𝑒 𝑣𝐿𝑖𝑠𝑡 − 1:
Get j and Pj from 𝑣𝐿𝑖𝑠𝑡[𝛽]
If i<j: output { (i, j), Sij }
Else if i>j: output { (j, i), Sij }
Post processing work:
• 1. Filter out the false positives by
calculate similarities for those
candidate pairs. Then we will have
the similar persons (“closefriend”) for
a lot of users.
• General ides is using 2 MR jobs:
• 1st MR job use i as key and change
(i, j) to (i, j, Pi);
• 2nd MR job change (i, j, Pi) to (i, j,
Pi, Pj), so you can get similarity Sij.
• 2. Recommendation: for each user,
take the union of his/her close
friends’friend list and filter out the
members he/she already knows.
• General idea is:
• When you have a similar person
list like {a, [b1, b2, … ,bs]}, then
you transfer it to {a, [Pb1, Pb2, …,
Pbs]}, where Pbi is the friend list of
person bi.
• Then take the union of Pbi and
finally minus Pa.
Filter Out False Positives (2 MR jobs)
• 1st Mapper (multiple inputs):
Recommendation data:
(i, j) { i, (j, “R”) } if i<j
{ j, (i, “R”) } if i>j
Friend List data:
(i, Pi) {i, (Pi, “F”) }
• 1st Reducer: input:
{ i, [ (j, “R”) ∀j candidate paired
with i & j>i; (Pi, “F”) ] }
For each j from input:
Output {j, (i, Pi, ”temp”)}
• 2nd Mapper (multiple inputs):
Temporary data: Pass
Friend List data:
(j, Pj) {j, (Pj, “F”) }
• 2nd Reducer: input:
{ j, [ (i, Pi, “temp”) ∀𝑖 associated
with j; (Pj, “F”) ] }
For each i:
Sij=similarity(Pi, Pj)
If Sij>=0.1: output {(i, j), Sij}
Recommendation (3 MR jobs):
• 1st Mapper (multiple inputs):
• Similar persons list data:
{ a, [b1,b2,…,bs]} {bi, (a, “S”)} for all i
• Friend List data:
(bi, Pbi) {bi, (Pbi, “F”) }
• 1st Reducer: input:
{bi, [ (a, ”S”) ∀a similar to bi; (Pbi, ”F”) ]}
For each a from input:
Output {a, Pbi}
• 2nd Mapper: Pass
• 2nd Reducer:
input: { a, [Pb1, Pb2, …, Pbs] }
U = Pb1 ∪ Pb2 ∪ … ∪ Pbs
Output {a, U}
• 3rd Mapper (multiple inputs):
(i, Ui) {i, (Ui, “u”)}
(i, Pi) {i, (Pi, “F”)]
• 3rd Reducer: input:
{i, [(Ui, “u”),(Pi, “F”)] }
Output {i, Ui-Pi}
Reference:
• 1. Mining of Massive Dataset, Jure Leskovec, Anand Rajaraman and Jeffrey D. Ullman.
• 2. Bimal Viswanath, Alan Mislove, Meeyoung Cha, and Krishna P. Gummadi. 2009. On the
evolution of user interaction in Facebook. In Proceedings of the 2nd ACM workshop on Online
social networks (WOSN '09). ACM, New York, NY, USA, 37-42.
DOI=http://dx.doi.org/10.1145/1592665.1592675

Más contenido relacionado

La actualidad más candente

Greedy Algorithms Huffman Coding.ppt
Greedy Algorithms  Huffman Coding.pptGreedy Algorithms  Huffman Coding.ppt
Greedy Algorithms Huffman Coding.pptRuchika Sinha
 
Data Structure: TREES
Data Structure: TREESData Structure: TREES
Data Structure: TREESTABISH HAMID
 
Artificial Intelligence MCQ Part 1 | 50 AI MCQs | Multiple Choice Questions &...
Artificial Intelligence MCQ Part 1 | 50 AI MCQs | Multiple Choice Questions &...Artificial Intelligence MCQ Part 1 | 50 AI MCQs | Multiple Choice Questions &...
Artificial Intelligence MCQ Part 1 | 50 AI MCQs | Multiple Choice Questions &...RahulSharma4566
 
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
non linear data structure -introduction of tree
non linear data structure -introduction of treenon linear data structure -introduction of tree
non linear data structure -introduction of treeSiddhi Viradiya
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree methodRajendran
 
Unsign multiplication
Unsign multiplicationUnsign multiplication
Unsign multiplicationMdRiyad5
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structureAbrish06
 
DATA STRUCTURES unit 4.pptx
DATA STRUCTURES unit 4.pptxDATA STRUCTURES unit 4.pptx
DATA STRUCTURES unit 4.pptxShivamKrPathak
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihmSajid Marwat
 
資管所網路補充考卷(適用交大、政大、中山、成大)
資管所網路補充考卷(適用交大、政大、中山、成大)資管所網路補充考卷(適用交大、政大、中山、成大)
資管所網路補充考卷(適用交大、政大、中山、成大)逸 張
 
Digital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsDigital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsImran Waris
 
BINARY TREE REPRESENTATION.ppt
BINARY TREE REPRESENTATION.pptBINARY TREE REPRESENTATION.ppt
BINARY TREE REPRESENTATION.pptSeethaDinesh
 

La actualidad más candente (20)

Red black tree
Red black treeRed black tree
Red black tree
 
les graphes v2.pptx
les graphes v2.pptxles graphes v2.pptx
les graphes v2.pptx
 
Greedy Algorithms Huffman Coding.ppt
Greedy Algorithms  Huffman Coding.pptGreedy Algorithms  Huffman Coding.ppt
Greedy Algorithms Huffman Coding.ppt
 
Data Structure: TREES
Data Structure: TREESData Structure: TREES
Data Structure: TREES
 
Artificial Intelligence MCQ Part 1 | 50 AI MCQs | Multiple Choice Questions &...
Artificial Intelligence MCQ Part 1 | 50 AI MCQs | Multiple Choice Questions &...Artificial Intelligence MCQ Part 1 | 50 AI MCQs | Multiple Choice Questions &...
Artificial Intelligence MCQ Part 1 | 50 AI MCQs | Multiple Choice Questions &...
 
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
 
non linear data structure -introduction of tree
non linear data structure -introduction of treenon linear data structure -introduction of tree
non linear data structure -introduction of tree
 
Recursion tree method
Recursion tree methodRecursion tree method
Recursion tree method
 
Unsign multiplication
Unsign multiplicationUnsign multiplication
Unsign multiplication
 
Graph in data structure
Graph in data structureGraph in data structure
Graph in data structure
 
DATA STRUCTURES unit 4.pptx
DATA STRUCTURES unit 4.pptxDATA STRUCTURES unit 4.pptx
DATA STRUCTURES unit 4.pptx
 
14 Skip Lists
14 Skip Lists14 Skip Lists
14 Skip Lists
 
Solutions1.1
Solutions1.1Solutions1.1
Solutions1.1
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihm
 
Matrix multiplication
Matrix multiplicationMatrix multiplication
Matrix multiplication
 
資管所網路補充考卷(適用交大、政大、中山、成大)
資管所網路補充考卷(適用交大、政大、中山、成大)資管所網路補充考卷(適用交大、政大、中山、成大)
資管所網路補充考卷(適用交大、政大、中山、成大)
 
Digital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systemsDigital and Logic Design Chapter 1 binary_systems
Digital and Logic Design Chapter 1 binary_systems
 
BINARY TREE REPRESENTATION.ppt
BINARY TREE REPRESENTATION.pptBINARY TREE REPRESENTATION.ppt
BINARY TREE REPRESENTATION.ppt
 
Basics of K map
Basics of K mapBasics of K map
Basics of K map
 
Digital Search Tree
Digital Search TreeDigital Search Tree
Digital Search Tree
 

Destacado

Church. Got an app for that?
Church. Got an app for that?Church. Got an app for that?
Church. Got an app for that?ASDSVV
 
Лесной_план_региона_как_ориентир_для_инвестора
Лесной_план_региона_как_ориентир_для_инвестораЛесной_план_региона_как_ориентир_для_инвестора
Лесной_план_региона_как_ориентир_для_инвестораFedor Grabar
 
3 d pie chart circular puzzle with hole in center pieces 8 stages style 1 pow...
3 d pie chart circular puzzle with hole in center pieces 8 stages style 1 pow...3 d pie chart circular puzzle with hole in center pieces 8 stages style 1 pow...
3 d pie chart circular puzzle with hole in center pieces 8 stages style 1 pow...SlideTeam.net
 
Econ214 macroeconomics chapter 19
Econ214 macroeconomics chapter 19Econ214 macroeconomics chapter 19
Econ214 macroeconomics chapter 19BHUOnlineDepartment
 
Aimia: The Big Deal About Big Data -- How It Will Transform Pharma Meeting an...
Aimia: The Big Deal About Big Data -- How It Will Transform Pharma Meeting an...Aimia: The Big Deal About Big Data -- How It Will Transform Pharma Meeting an...
Aimia: The Big Deal About Big Data -- How It Will Transform Pharma Meeting an...David Nickelson, PsyD, JD
 
Greythorn Market Insights - February 2013
Greythorn Market Insights - February 2013Greythorn Market Insights - February 2013
Greythorn Market Insights - February 2013GreythornAU
 
3 d pie chart circular puzzle with hole in center pieces 6 stages style 1 pow...
3 d pie chart circular puzzle with hole in center pieces 6 stages style 1 pow...3 d pie chart circular puzzle with hole in center pieces 6 stages style 1 pow...
3 d pie chart circular puzzle with hole in center pieces 6 stages style 1 pow...SlideTeam.net
 
Symbiosis international university
Symbiosis international universitySymbiosis international university
Symbiosis international universityyunus khan
 
PrivateWave - sales presentation_en
PrivateWave - sales presentation_enPrivateWave - sales presentation_en
PrivateWave - sales presentation_enMarco Pissarello
 
Individualisierte Mehrwertdienste - Wie Telekommunikationsunternehmen der Com...
Individualisierte Mehrwertdienste - Wie Telekommunikationsunternehmen der Com...Individualisierte Mehrwertdienste - Wie Telekommunikationsunternehmen der Com...
Individualisierte Mehrwertdienste - Wie Telekommunikationsunternehmen der Com...Iskander Business Partner GmbH
 
Les Grossman's Pro Tips for Local SEO
Les Grossman's Pro Tips for Local SEOLes Grossman's Pro Tips for Local SEO
Les Grossman's Pro Tips for Local SEOGreg Gifford
 
NV kunstenaar Jan De Cock in de financiële problemen
NV kunstenaar Jan De Cock in de financiële problemenNV kunstenaar Jan De Cock in de financiële problemen
NV kunstenaar Jan De Cock in de financiële problemenThierry Debels
 
Grafico diario del dax perfomance index para el 12 12-2012
Grafico diario del dax perfomance index para el 12 12-2012Grafico diario del dax perfomance index para el 12 12-2012
Grafico diario del dax perfomance index para el 12 12-2012Experiencia Trading
 
Os factores productivos
Os factores productivosOs factores productivos
Os factores productivosLeoperu Return
 
Neighborhood Watch prototype (storyboard narrative)
Neighborhood Watch prototype (storyboard narrative)Neighborhood Watch prototype (storyboard narrative)
Neighborhood Watch prototype (storyboard narrative)JosephHowerton
 

Destacado (19)

Church. Got an app for that?
Church. Got an app for that?Church. Got an app for that?
Church. Got an app for that?
 
Лесной_план_региона_как_ориентир_для_инвестора
Лесной_план_региона_как_ориентир_для_инвестораЛесной_план_региона_как_ориентир_для_инвестора
Лесной_план_региона_как_ориентир_для_инвестора
 
My social representation
My social representationMy social representation
My social representation
 
3 d pie chart circular puzzle with hole in center pieces 8 stages style 1 pow...
3 d pie chart circular puzzle with hole in center pieces 8 stages style 1 pow...3 d pie chart circular puzzle with hole in center pieces 8 stages style 1 pow...
3 d pie chart circular puzzle with hole in center pieces 8 stages style 1 pow...
 
Kunst, økonomi, kreativ kapitalisme
Kunst, økonomi, kreativ kapitalismeKunst, økonomi, kreativ kapitalisme
Kunst, økonomi, kreativ kapitalisme
 
Econ214 macroeconomics chapter 19
Econ214 macroeconomics chapter 19Econ214 macroeconomics chapter 19
Econ214 macroeconomics chapter 19
 
Aimia: The Big Deal About Big Data -- How It Will Transform Pharma Meeting an...
Aimia: The Big Deal About Big Data -- How It Will Transform Pharma Meeting an...Aimia: The Big Deal About Big Data -- How It Will Transform Pharma Meeting an...
Aimia: The Big Deal About Big Data -- How It Will Transform Pharma Meeting an...
 
Naturalismo
NaturalismoNaturalismo
Naturalismo
 
Bia
BiaBia
Bia
 
Greythorn Market Insights - February 2013
Greythorn Market Insights - February 2013Greythorn Market Insights - February 2013
Greythorn Market Insights - February 2013
 
3 d pie chart circular puzzle with hole in center pieces 6 stages style 1 pow...
3 d pie chart circular puzzle with hole in center pieces 6 stages style 1 pow...3 d pie chart circular puzzle with hole in center pieces 6 stages style 1 pow...
3 d pie chart circular puzzle with hole in center pieces 6 stages style 1 pow...
 
Symbiosis international university
Symbiosis international universitySymbiosis international university
Symbiosis international university
 
PrivateWave - sales presentation_en
PrivateWave - sales presentation_enPrivateWave - sales presentation_en
PrivateWave - sales presentation_en
 
Individualisierte Mehrwertdienste - Wie Telekommunikationsunternehmen der Com...
Individualisierte Mehrwertdienste - Wie Telekommunikationsunternehmen der Com...Individualisierte Mehrwertdienste - Wie Telekommunikationsunternehmen der Com...
Individualisierte Mehrwertdienste - Wie Telekommunikationsunternehmen der Com...
 
Les Grossman's Pro Tips for Local SEO
Les Grossman's Pro Tips for Local SEOLes Grossman's Pro Tips for Local SEO
Les Grossman's Pro Tips for Local SEO
 
NV kunstenaar Jan De Cock in de financiële problemen
NV kunstenaar Jan De Cock in de financiële problemenNV kunstenaar Jan De Cock in de financiële problemen
NV kunstenaar Jan De Cock in de financiële problemen
 
Grafico diario del dax perfomance index para el 12 12-2012
Grafico diario del dax perfomance index para el 12 12-2012Grafico diario del dax perfomance index para el 12 12-2012
Grafico diario del dax perfomance index para el 12 12-2012
 
Os factores productivos
Os factores productivosOs factores productivos
Os factores productivos
 
Neighborhood Watch prototype (storyboard narrative)
Neighborhood Watch prototype (storyboard narrative)Neighborhood Watch prototype (storyboard narrative)
Neighborhood Watch prototype (storyboard narrative)
 

Similar a Local sensitive hashing &amp; minhash on facebook friend

Probabilistic data structures. Part 4. Similarity
Probabilistic data structures. Part 4. SimilarityProbabilistic data structures. Part 4. Similarity
Probabilistic data structures. Part 4. SimilarityAndrii Gakhov
 
Building graphs to discover information by David Martínez at Big Data Spain 2015
Building graphs to discover information by David Martínez at Big Data Spain 2015Building graphs to discover information by David Martínez at Big Data Spain 2015
Building graphs to discover information by David Martínez at Big Data Spain 2015Big Data Spain
 
Mining of massive datasets using locality sensitive hashing (LSH)
Mining of massive datasets using locality sensitive hashing (LSH)Mining of massive datasets using locality sensitive hashing (LSH)
Mining of massive datasets using locality sensitive hashing (LSH)J Singh
 
Similarity Search in High Dimensions via Hashing
Similarity Search in High Dimensions via HashingSimilarity Search in High Dimensions via Hashing
Similarity Search in High Dimensions via HashingMaruf Aytekin
 
Open LSH - september 2014 update
Open LSH  - september 2014 updateOpen LSH  - september 2014 update
Open LSH - september 2014 updateJ Singh
 
Skiena algorithm 2007 lecture06 sorting
Skiena algorithm 2007 lecture06 sortingSkiena algorithm 2007 lecture06 sorting
Skiena algorithm 2007 lecture06 sortingzukun
 
Bioinformatics t5-database searching-v2013_wim_vancriekinge
Bioinformatics t5-database searching-v2013_wim_vancriekingeBioinformatics t5-database searching-v2013_wim_vancriekinge
Bioinformatics t5-database searching-v2013_wim_vancriekingeProf. Wim Van Criekinge
 
Hashing And Hashing Tables
Hashing And Hashing TablesHashing And Hashing Tables
Hashing And Hashing TablesChinmaya M. N
 
Introduction to simulating data to improve your research
Introduction to simulating data to improve your researchIntroduction to simulating data to improve your research
Introduction to simulating data to improve your researchDorothy Bishop
 
Project - Deep Locality Sensitive Hashing
Project - Deep Locality Sensitive HashingProject - Deep Locality Sensitive Hashing
Project - Deep Locality Sensitive HashingGabriele Angeletti
 
Lecture-2-Relational-Algebra-and-SQL-Advanced-DataBase-Theory-MS.pdf
Lecture-2-Relational-Algebra-and-SQL-Advanced-DataBase-Theory-MS.pdfLecture-2-Relational-Algebra-and-SQL-Advanced-DataBase-Theory-MS.pdf
Lecture-2-Relational-Algebra-and-SQL-Advanced-DataBase-Theory-MS.pdfssuserf86fba
 
Machine learning session8(svm nlp)
Machine learning   session8(svm nlp)Machine learning   session8(svm nlp)
Machine learning session8(svm nlp)Abhimanyu Dwivedi
 
NLP - Sentiment Analysis
NLP - Sentiment AnalysisNLP - Sentiment Analysis
NLP - Sentiment AnalysisRupak Roy
 
How Does Math Matter in Data Science
How Does Math Matter in Data ScienceHow Does Math Matter in Data Science
How Does Math Matter in Data ScienceMutia Ulfi
 
Data simulation basics
Data simulation basicsData simulation basics
Data simulation basicsDorothy Bishop
 
Hash in datastructures by using the c language.pptx
Hash in datastructures by using the c language.pptxHash in datastructures by using the c language.pptx
Hash in datastructures by using the c language.pptxmy6305874
 
Sequence alignment unit 3
Sequence alignment unit 3Sequence alignment unit 3
Sequence alignment unit 3gyanikashukla
 

Similar a Local sensitive hashing &amp; minhash on facebook friend (20)

Probabilistic data structures. Part 4. Similarity
Probabilistic data structures. Part 4. SimilarityProbabilistic data structures. Part 4. Similarity
Probabilistic data structures. Part 4. Similarity
 
Building graphs to discover information by David Martínez at Big Data Spain 2015
Building graphs to discover information by David Martínez at Big Data Spain 2015Building graphs to discover information by David Martínez at Big Data Spain 2015
Building graphs to discover information by David Martínez at Big Data Spain 2015
 
Mining of massive datasets using locality sensitive hashing (LSH)
Mining of massive datasets using locality sensitive hashing (LSH)Mining of massive datasets using locality sensitive hashing (LSH)
Mining of massive datasets using locality sensitive hashing (LSH)
 
Similarity Search in High Dimensions via Hashing
Similarity Search in High Dimensions via HashingSimilarity Search in High Dimensions via Hashing
Similarity Search in High Dimensions via Hashing
 
Bigdata analytics
Bigdata analyticsBigdata analytics
Bigdata analytics
 
Open LSH - september 2014 update
Open LSH  - september 2014 updateOpen LSH  - september 2014 update
Open LSH - september 2014 update
 
Skiena algorithm 2007 lecture06 sorting
Skiena algorithm 2007 lecture06 sortingSkiena algorithm 2007 lecture06 sorting
Skiena algorithm 2007 lecture06 sorting
 
Bioinformatics t5-database searching-v2013_wim_vancriekinge
Bioinformatics t5-database searching-v2013_wim_vancriekingeBioinformatics t5-database searching-v2013_wim_vancriekinge
Bioinformatics t5-database searching-v2013_wim_vancriekinge
 
Hashing And Hashing Tables
Hashing And Hashing TablesHashing And Hashing Tables
Hashing And Hashing Tables
 
Introduction to simulating data to improve your research
Introduction to simulating data to improve your researchIntroduction to simulating data to improve your research
Introduction to simulating data to improve your research
 
Project - Deep Locality Sensitive Hashing
Project - Deep Locality Sensitive HashingProject - Deep Locality Sensitive Hashing
Project - Deep Locality Sensitive Hashing
 
Hashing
HashingHashing
Hashing
 
Lecture-2-Relational-Algebra-and-SQL-Advanced-DataBase-Theory-MS.pdf
Lecture-2-Relational-Algebra-and-SQL-Advanced-DataBase-Theory-MS.pdfLecture-2-Relational-Algebra-and-SQL-Advanced-DataBase-Theory-MS.pdf
Lecture-2-Relational-Algebra-and-SQL-Advanced-DataBase-Theory-MS.pdf
 
Machine learning session8(svm nlp)
Machine learning   session8(svm nlp)Machine learning   session8(svm nlp)
Machine learning session8(svm nlp)
 
NLP - Sentiment Analysis
NLP - Sentiment AnalysisNLP - Sentiment Analysis
NLP - Sentiment Analysis
 
QBIC
QBICQBIC
QBIC
 
How Does Math Matter in Data Science
How Does Math Matter in Data ScienceHow Does Math Matter in Data Science
How Does Math Matter in Data Science
 
Data simulation basics
Data simulation basicsData simulation basics
Data simulation basics
 
Hash in datastructures by using the c language.pptx
Hash in datastructures by using the c language.pptxHash in datastructures by using the c language.pptx
Hash in datastructures by using the c language.pptx
 
Sequence alignment unit 3
Sequence alignment unit 3Sequence alignment unit 3
Sequence alignment unit 3
 

Más de Chengeng Ma

Certificate ofcompletion extending hadoop for data science streaming spark st...
Certificate ofcompletion extending hadoop for data science streaming spark st...Certificate ofcompletion extending hadoop for data science streaming spark st...
Certificate ofcompletion extending hadoop for data science streaming spark st...Chengeng Ma
 
Tang poetry inspiration machine using seq2seq
Tang poetry inspiration machine using seq2seqTang poetry inspiration machine using seq2seq
Tang poetry inspiration machine using seq2seqChengeng Ma
 
Tang poetry inspiration machine using char level rnn
Tang poetry inspiration machine using char level rnnTang poetry inspiration machine using char level rnn
Tang poetry inspiration machine using char level rnnChengeng Ma
 
Yelp challenge reviews_sentiment_classification
Yelp challenge reviews_sentiment_classificationYelp challenge reviews_sentiment_classification
Yelp challenge reviews_sentiment_classificationChengeng Ma
 
A hadoop implementation of pagerank
A hadoop implementation of pagerankA hadoop implementation of pagerank
A hadoop implementation of pagerankChengeng Ma
 
Hadoop implementation for algorithms apriori, pcy, son
Hadoop implementation for algorithms apriori, pcy, sonHadoop implementation for algorithms apriori, pcy, son
Hadoop implementation for algorithms apriori, pcy, sonChengeng Ma
 

Más de Chengeng Ma (6)

Certificate ofcompletion extending hadoop for data science streaming spark st...
Certificate ofcompletion extending hadoop for data science streaming spark st...Certificate ofcompletion extending hadoop for data science streaming spark st...
Certificate ofcompletion extending hadoop for data science streaming spark st...
 
Tang poetry inspiration machine using seq2seq
Tang poetry inspiration machine using seq2seqTang poetry inspiration machine using seq2seq
Tang poetry inspiration machine using seq2seq
 
Tang poetry inspiration machine using char level rnn
Tang poetry inspiration machine using char level rnnTang poetry inspiration machine using char level rnn
Tang poetry inspiration machine using char level rnn
 
Yelp challenge reviews_sentiment_classification
Yelp challenge reviews_sentiment_classificationYelp challenge reviews_sentiment_classification
Yelp challenge reviews_sentiment_classification
 
A hadoop implementation of pagerank
A hadoop implementation of pagerankA hadoop implementation of pagerank
A hadoop implementation of pagerank
 
Hadoop implementation for algorithms apriori, pcy, son
Hadoop implementation for algorithms apriori, pcy, sonHadoop implementation for algorithms apriori, pcy, son
Hadoop implementation for algorithms apriori, pcy, son
 

Último

Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themeitharjee
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...gajnagarg
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...gajnagarg
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Klinik kandungan
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...nirzagarg
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteedamy56318795
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...HyderabadDolls
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...Health
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...kumargunjan9515
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1ranjankumarbehera14
 
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...gragchanchal546
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...Bertram Ludäscher
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxronsairoathenadugay
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...nirzagarg
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRajesh Mondal
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...Elaine Werffeli
 

Último (20)

Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Tumkur [ 7014168258 ] Call Me For Genuine Models We...
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about them
 
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Indore [ 7014168258 ] Call Me For Genuine Models We...
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
Top profile Call Girls In Begusarai [ 7014168258 ] Call Me For Genuine Models...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
Sealdah % High Class Call Girls Kolkata - 450+ Call Girl Cash Payment 8005736...
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1
 
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
Gulbai Tekra * Cheap Call Girls In Ahmedabad Phone No 8005736733 Elite Escort...
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptxRESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
RESEARCH-FINAL-DEFENSE-PPT-TEMPLATE.pptx
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
Ranking and Scoring Exercises for Research
Ranking and Scoring Exercises for ResearchRanking and Scoring Exercises for Research
Ranking and Scoring Exercises for Research
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 

Local sensitive hashing &amp; minhash on facebook friend

  • 1. Local Sensitive Hashing & Minhash on Facebook friend links data & friends recommendation Chengeng Ma Stony Brook University 2016/03/05
  • 2. 1. What is Local Sensitive Hash & Minhash? • If you are familiar with LSH and Minhash, please directly go to page 12, because the following pages are just fundamental knowledge about this topic, which you can find more details in the book, Mining of Massive Dataset, written by Jure Leskovec, Anand Rajaraman and Jeffrey D. Ullman.
  • 3. What is LSH & Minhash about? • Local Sensitive Hash (LSH) & Minhash are two profoundly important methods in Big Datafor finding similar items. • In Amazon, if you can find two similar persons, you can recommend to one person the items the other has purchased. • For Google, Baidu, …, users always hope the search engine can find pictures similar to the one they have uploaded.
  • 4. Calculating similarity between each pair is a lot of computation (Why LSH?) • If you have 106 items within your data, you will need almost 0.5 × 1012 times computation to know the similarities between each pair. • You will need to parallel a lot of tasks to deal with this huge computation amount. • You can do this with the help of Hadoop, but you can do better with the help of LSH & Minhash. • The LSH can hash one item to a bucket based on the feature list that item has. • If two items are quite similar with each other in their feature lists, then they will have a large probability to be hashed into the same bucket. • You can amplify this effect to different extent by setting parameters. • Finally, you only need to compute similarities for the pairs formed by the items within the same bucket.
  • 5. How Minhash comes in? • The LSH needs you keep the feature list of each item in the format like a matrix (the sequence is important). • If the size of universal set is fixed or small, e.g., the fingerprint array, then LSH alone can work well. 1st column represents the items person S1 has purchased. 1st row represents who has purchased item a.
  • 6. How Minhash comes in? • Jaccard Similarity = 2/7 • However, if the universal set is large or not size-fixed, e.g., items purchased by each account, friend list on social network, … • Then formatting the dataset into matrix is not efficient, since the dataset is usually very sparse. • Then Minhash works, if the similarities between two feature lists is calculated as Jaccard similarities.
  • 7. What’s Minhash value? • Permute the original matrix by row. • For each column (set), the 1st non-empty element’s row index is the minhash value of that column. Original matrix Permute to a different order: b, e, a, d, c. H(S1)=a, H(S2)=c, H(S3)=b, H(S4)=a.
  • 8. Minhash’s property (similarity preserved): • 3 kinds of rows between set 𝑆 𝑎 & 𝑆 𝑏: (x): both sets have 1; (y): one has 1, the other has 0; (z): both sets have 0. 𝐽 𝑎𝑏 = |𝑋| 𝑋 + |𝑌| Pr ℎ 𝑆 𝑎 = ℎ 𝑆 𝑏 = |𝑋| 𝑋 + |𝑌| • If you do 100 times different minhash, you reduce one dimension of the matrix from unknown large to 100. • The probability that two sets share the same minhash value equals the Jaccard similarity between them. Pr ℎ 𝑆 𝑎 = ℎ 𝑆 𝑏 = 𝐽 𝑎𝑏
  • 9. Permutations can be simulated by hash functions • For j th column in original matrix, find all the non-empty elements, try to input their indexes into the i th hash function, the minimum output is the element SIG(i, j). • Hash function: 𝑎 ∗ 𝑥 + 𝑏 % 𝑁 : • where N is a prime, equal to or slightly larger than the size of universal set (# of rows of original matrix), • a & b must be integers within [1, N-1]. • The result signature matrix, where row index is for hash functions, column index is for sets. For example, we use 2 hash functions to simulate 2 permutations: (x+1)%5 and (3x+1)%5, where x is row index SIG
  • 10. Now you have signature matrix, you use it instead of original matrix to do LSH. • Divide the signature matrix into b bands, each of which has r rows. • For each band range, build an empty hashtable, hash each column (portion within the band range) into a bucket, so that only identical bands are hashed into the same bucket. • Columns within the same bucket are considered candidates that you should form pairs and calculate similarities. • Take the union of different band ranges and filter out the false positives.
  • 11. Jaccard Similarity Probability of becoming a candidate Why LSH works? --- the amplification effects
  • 12. 2. Details of my class project: dataset • User-to-user links from Facebook New Orleans networks data. • The data is created by Bimal Viswanath et al. and used for their paper On the Evolution of User Interactionin Facebook. • It can be download in http://socialnetworks.mpi- sws.org/data/facebook-links.txt.gz • It has 63,731 persons and 1,545,686 links, 10.4 MB in size. • The data is not large, but as a training, I will use Hadoop during this project.
  • 13. My class project plan: • Firstly find similar persons based on users’ friend lists, where LSH and Minhash will be implemented in Hadoop. • The similar persons are called “close friend” in this project. • Then recommend to you the persons who are friends of your close friend but not yet of you. • It generally sounds like Collaborative Filtering. • Two persons who have similar friend list are considered “close friends”, since they must have some relationship in the real world, e.g., schoolmates, workmates, teammate, … • If you’re good friend of someone, you may like to know more of his/her friend. • We do not set too high threshold for similarity, since finding a duplicate of you is not interesting.
  • 14. Why not just use common friend counts? • The classicalway is based on number of common friends. • However, there are some persons who have a lot of common friends with you, but has nothing to do with you, e.g., celebrities, politics, salesmen who want to sell their stuff through social network, or even swindlers… • People use social network to find friends that can physically reach them, but not for persons too far away from them. • Most of my friends may like a pop singer and become friends of him. Based on common friends, system will recommend that pop singer to me. • But the pop singer can never remember me, since he has millions of friends on site.
  • 15. Prepare work: • 1. Make data into the format like below, where j represents the j th person, Pj is a list of friends of person j. • 2. In this study, 63731 is both the number of sets to compare and the size of universal element set. Because both the key j and the elements within set Pj are user id. 1: P1 2: P2 … … n: Pn • 3. 63731 is not a prime (101*631). Only prime number can simulate true permutations. We use 63737 instead, equivalent to adding 6 persons that has no friends online. • 4. Hash function for Minhash: N=63737L; hashNum=100; private long fhash ( int i, long x ) { return 13 + 𝑥 − 1 ∗ ( 𝑁∗𝑖 3∗ℎ𝑎𝑠ℎ𝑁𝑢𝑚 + 1) %𝑁 ; } 1 ≤ 𝑥 ≤ 𝑁, 0 ≤ 𝑖 ≤ ℎ𝑎𝑠ℎ𝑁𝑢𝑚 − 1
  • 16. Pseudocode of Minhash (Map job only) • Mapper input: (c, Pc), where Pc represents a list [ j1, j2, …, js ]; • Build a new array s[hashNum] (hashNum=100here), initialized as infinity everywhere. • For i th hash function, each element jj in Pc is an opportunity to get lower hash value, finally the minimum hash value from all jj is the minhash in SIG[i,c]. • Output c as key, the content of array s as value. input (c, Pc), where Pc= [ j1, j2, …, js ] long[] s = new long[hashNum]; for 0 ≤ 𝑖𝑖 ≤ ℎ𝑎𝑠ℎ𝑁𝑢𝑚 − 1: s[ii] = infinity; end for jj in [ j1, j2, …, js ]: for 0 ≤ 𝑖𝑖 ≤ ℎ𝑎𝑠ℎ𝑁𝑢𝑚 − 1: s[ii] = min (s[ii], fhash(ii, jj)); end End Output (c, array s);
  • 17. Pseudocode for LSH: • Mapper input (j, 𝑆𝑗), where 𝑆𝑗 is the j th column of signature matrix. • Split array 𝑆𝑗 into B bands as, 𝑆𝑗1, 𝑆𝑗2, …, 𝑆𝑗𝐵. • For b th band, get its hash value stored in myHash. • Output the tuple (b, myHash) as key, j as value. for 1 ≤ 𝑏 ≤ 𝐵: myHash = getHashValue(𝑆𝑗𝑏) Output { ( b, myHash ), j } end • Reducer input: { (b, aHashValue), [𝑗1, 𝑗2, …, 𝑗 𝑝] } Now, form pairs between 𝑗1, …, 𝑗 𝑝and output as candidate pairs. for 1 ≤ 𝑥 ≤ 𝑝 − 1: for 𝑥 + 1 ≤ 𝑦 ≤ 𝑝: output (𝑗 𝑥, 𝑗 𝑦) end end One more program is needed to remove duplicates. Hadoop’ssorting procedure helps us gathering all the items that both has the same hash value and comes from the same band range.
  • 18. Hash function for LSH: • The LSH needs to hash a band portion of vector into a value. • It hopes only identical vectors can be hashed into the same bucket. • An easy way is to directly use its string expression, since Hadoop also uses Text to transport data. • For example, hash the below portion into string: • In this way, only exactly same vector portion can comes into the same bucket. “21,14,36,55” Hash to string
  • 19. Parameters set: • We do not want to set threshold of similarity too high, since finding a duplicate of you on web is not interesting. • So we set the threshold of similarity near 0.1. • We set B=50 and hashNum=100, so that each band in LSH has R=2 rows. 𝑃 𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 𝑥) = 1 − (1 − 𝑥 𝑅 ) 𝐵 • S curve grows quickly: • X=0.1, P=0.39 • X=0.15, P=0.68 • X=0.2, P=0.87 B=50, R=2
  • 20. Result Test: • 𝑃 𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 𝑥) = 𝑃(𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 & 𝑥≤𝑠<𝑥+𝑑𝑥) 𝑃(𝑥≤𝑠<𝑥+𝑑𝑥) • 𝑃 𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 𝑥) = 1 − (1 − 𝑥 𝑅) 𝐵 • The Hadoop output can be analyzed to get 𝑃(𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 & 𝑥 ≤ 𝑠 < 𝑥 + 𝑑𝑥). • For 𝑃(𝑥 ≤ 𝑠 < 𝑥 + 𝑑𝑥), another Hadoop program is written to really calculatethe similarities within all possible pairs (which takes N(N-1)/2times computation),since the dataset is not too large. • But only the similarities equal to or larger than 0.1 is stored in output file, because it takes several Terabytes to store all the similarities.
  • 21. 𝑃 𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 𝑥) derived from real dataset (blue) and the theoretical curve (red)
  • 22. Histogram of LSH recommended pairs and all existing pairs (but cut at 0.1) within the data
  • 23. Statistics • The LSH & Minhash recommends 1,065,318 pairs. • There are 660,334 existing pairs that really have s larger than 0.1. • Intersection of them have 429,176 pairs, which contains 65% of similar pairs (s>0.1). • But the computation is hundreds of times faster than before. • 1 − (1 − 𝑥 𝑅 ) 𝐵 ) = 𝑃(𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 & 𝑥≤𝑠<𝑥+𝑑𝑥) 𝑃(𝑥≤𝑠<𝑥+𝑑𝑥) • We define a reference value 𝑥 𝑅𝑒𝑓: • 1 − (1 − 𝑥 𝑅𝑒𝑓 𝑅 ) 𝐵 )= 0.1 1 𝑃 𝑟𝑒𝑐𝑜𝑚𝑚𝑒𝑛𝑑 & 𝑥 ≤ 𝑠 < 𝑥 + 𝑑𝑥 𝑑𝑥 0.1 1 𝑃(𝑥 ≤ 𝑠 < 𝑥 + 𝑑𝑥) 𝑑𝑥 = 429176/660334 = 0.649938 Take in parameters B=50, R=2 𝑥 𝑅𝑒𝑓 = 0.1441 , which is slightly above 0.1
  • 24. How to calculate 𝑃(𝑥 ≤ 𝑠 < 𝑥 + 𝑑𝑥)? (Similarity Joins Problem) • To get the exact P.D.F., you need to really calculate the similarities for all N(N-1)/2 pairs. • Using Hadoop can parallel and speed up. But don’t use too high replicate rate. • How about the right hand side method? Mapper input: (i, Pi) for 1 ≤ j ≤N: if i < j: output {(i, j),Pi} else if i > j: output {(j, i), Pi} end Reducer input: { (i, j), [Pi, Pj] } Output { (i, j), Sij } • This method takes replicate rate as N and will definitely fail. The correct way is to split persons into G groups.
  • 25. The correct way to get similarities between all pairs by Hadoop. • Mapper input: (i, Pi) • Determine its group number as u=i%G, where G is the number of groups you split, it is also the replicate rate. • For 0 ≤ v ≤G-1: • If u < v: Output { (u, v), (i, Pi) } • Else if u>v: Output { (v, u), (i, Pi) } • end • Reducer input: • { (u, v), [∀ 𝑖, 𝑃𝑖 ∈ 𝐺𝑟𝑜𝑢𝑝 𝑢, ∀ 𝑗, 𝑃𝑗 ∈ 𝐺𝑟𝑜𝑢𝑝 𝑣] } • Create two empty list uList & vList, separately to gather all 𝑖, 𝑃𝑖 that belongs to group u and v. For 0 ≤ 𝛼 ≤ 𝑠𝑖𝑧𝑒 𝑢𝐿𝑖𝑠𝑡 − 1: Get i and Pi from 𝑢𝐿𝑖𝑠𝑡[𝛼] For 0 ≤ 𝛽 ≤ 𝑠𝑖𝑧𝑒 𝑣𝐿𝑖𝑠𝑡 − 1: Get j and Pj from 𝑣𝐿𝑖𝑠𝑡[𝛽] If i<j: output { (i, j), Sij } Else if i>j: output { (j, i), Sij } v Continued in the next page
  • 26. Still within the reducer: • The above only consider pairs whose element comes from different groups. • Now we consider elements within the same group. • We manage to avoid calculate the same pairs multiple times by setting if conditions. If v==u+1: For 0 ≤ 𝛼 ≤ 𝑠𝑖𝑧𝑒 𝑢𝐿𝑖𝑠𝑡 − 2: Get i and Pi from 𝑢𝐿𝑖𝑠𝑡[𝛼] For 𝛼 + 1 ≤ 𝛽 ≤ 𝑠𝑖𝑧𝑒 𝑢𝐿𝑖𝑠𝑡 − 1: Get j and Pj from 𝑢𝐿𝑖𝑠𝑡[𝛽] If i<j: output { (i, j), Sij } Else if i>j: output { (j, i), Sij } If u==0 & v==G-1: For 0 ≤ 𝛼 ≤ 𝑠𝑖𝑧𝑒 𝑣𝐿𝑖𝑠𝑡 − 2: Get i and Pi from 𝑣𝐿𝑖𝑠𝑡[𝛼] For 𝛼 + 1 ≤ 𝛽 ≤ 𝑠𝑖𝑧𝑒 𝑣𝐿𝑖𝑠𝑡 − 1: Get j and Pj from 𝑣𝐿𝑖𝑠𝑡[𝛽] If i<j: output { (i, j), Sij } Else if i>j: output { (j, i), Sij }
  • 27. Post processing work: • 1. Filter out the false positives by calculate similarities for those candidate pairs. Then we will have the similar persons (“closefriend”) for a lot of users. • General ides is using 2 MR jobs: • 1st MR job use i as key and change (i, j) to (i, j, Pi); • 2nd MR job change (i, j, Pi) to (i, j, Pi, Pj), so you can get similarity Sij. • 2. Recommendation: for each user, take the union of his/her close friends’friend list and filter out the members he/she already knows. • General idea is: • When you have a similar person list like {a, [b1, b2, … ,bs]}, then you transfer it to {a, [Pb1, Pb2, …, Pbs]}, where Pbi is the friend list of person bi. • Then take the union of Pbi and finally minus Pa.
  • 28. Filter Out False Positives (2 MR jobs) • 1st Mapper (multiple inputs): Recommendation data: (i, j) { i, (j, “R”) } if i<j { j, (i, “R”) } if i>j Friend List data: (i, Pi) {i, (Pi, “F”) } • 1st Reducer: input: { i, [ (j, “R”) ∀j candidate paired with i & j>i; (Pi, “F”) ] } For each j from input: Output {j, (i, Pi, ”temp”)} • 2nd Mapper (multiple inputs): Temporary data: Pass Friend List data: (j, Pj) {j, (Pj, “F”) } • 2nd Reducer: input: { j, [ (i, Pi, “temp”) ∀𝑖 associated with j; (Pj, “F”) ] } For each i: Sij=similarity(Pi, Pj) If Sij>=0.1: output {(i, j), Sij}
  • 29. Recommendation (3 MR jobs): • 1st Mapper (multiple inputs): • Similar persons list data: { a, [b1,b2,…,bs]} {bi, (a, “S”)} for all i • Friend List data: (bi, Pbi) {bi, (Pbi, “F”) } • 1st Reducer: input: {bi, [ (a, ”S”) ∀a similar to bi; (Pbi, ”F”) ]} For each a from input: Output {a, Pbi} • 2nd Mapper: Pass • 2nd Reducer: input: { a, [Pb1, Pb2, …, Pbs] } U = Pb1 ∪ Pb2 ∪ … ∪ Pbs Output {a, U} • 3rd Mapper (multiple inputs): (i, Ui) {i, (Ui, “u”)} (i, Pi) {i, (Pi, “F”)] • 3rd Reducer: input: {i, [(Ui, “u”),(Pi, “F”)] } Output {i, Ui-Pi}
  • 30. Reference: • 1. Mining of Massive Dataset, Jure Leskovec, Anand Rajaraman and Jeffrey D. Ullman. • 2. Bimal Viswanath, Alan Mislove, Meeyoung Cha, and Krishna P. Gummadi. 2009. On the evolution of user interaction in Facebook. In Proceedings of the 2nd ACM workshop on Online social networks (WOSN '09). ACM, New York, NY, USA, 37-42. DOI=http://dx.doi.org/10.1145/1592665.1592675