title
stringlengths
12
112
published
stringlengths
19
23
url
stringlengths
28
28
video_id
stringlengths
11
11
channel_id
stringclasses
5 values
id
stringlengths
16
31
text
stringlengths
0
596
start
float64
0
37.8k
end
float64
2.18
37.8k
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t844.96
point is for this min hash vector and our one-hot sparse vector here.
844.96
860.08
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t853.6800000000001
That signature value will be eight. And we repeat that for multiple min hash vectors.
853.68
867.36
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t860.08
Which is what you can see here. So if we were to work through this, so we saw one here,
860.08
874.24
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t867.36
that does not align to a one. So we work up to two and we find that it does align to a one. So that
867.36
883.28
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t874.24
is why we have this here. And then we go on to this one here. We find one and we work up to two.
874.24
892.64
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t883.28
We have this here. And then we go on to this one here. We find one does not align. Two,
883.28
901.76
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t894.16
still does not align. Three does not align. And four does align. So then we assign a four
894.16
908.72
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t902.72
in our min hash function. We go along and keep doing that to create our signature.
902.72
915.76
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t908.72
Okay. So I'm going to use these functions here. It's just what we wrote before, but put into a
908.72
920.56
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t915.76
cleaner format. And what I'm going to do is create 20 min hash vectors.
915.76
930.96
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t922.72
Run that. And then here we are going to run each of our one-hot sparse vectors
922.72
937.28
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t931.52
through our create hash function, which is here. And it's going to convert them into our signatures
931.52
944.8
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t937.28
as we described before. And we see here that we have also what did I mention. So here we have
937.28
949.12
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t944.8
20 min hash vectors, which means we have a length of 20 for each signature.
944.8
961.6
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t951.1999999999999
So what we see here are our dense vectors. And these are just compressed versions of our sparse
951.2
969.84
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t961.6
vectors. And we can check that that is true by we'll define a, we'll create a jaccard
961.6
978.96
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t970.5600000000001
similarity function. So we take, and here we take x and y both will be sets. And we just return the
970.56
985.84
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t979.6800000000001
length of the intersection between both of those. So the intersection between those
979.68
994.32
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t985.84
is divided by the union of both of those. So that is how you calculate jaccard similarity.
985.84
999.28
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t997.6800000000001
This should be a y.
997.68
1,008.24
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1002.08
Okay. And then if we do jaccard on both of those, so we have a sig, b sig.
1,002.08
1,017.76
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1008.24
These will have to be converted into sets. Forgot. So like that.
1,008.24
1,029.04
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1020.48
And then if we also take the jaccard for, I think it's just a and b, right?
1,020.48
1,042.08
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1029.04
So copy that. Okay. So we get, this is 0.6 and this is 1.4. Now, if we look up here, I think it's
1,029.04
1,048.56
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1043.6
a and b are not supposed to be very similar. So that's fine. And then b and c should be similar.
1,043.6
1,057.28
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1048.56
So if we swap this for c and then c here, we should both get higher values. And they should be
1,048.56
1,061.76
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1057.28
and they should be roughly in the same ballpark. I mean, they're not perfect because we're using a
1,057.28
1,071.04
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1061.76
very low number here. We're only using 20 values and typically use a lot more. But that's fine.
1,061.76
1,078.72
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1071.04
So you can see that they're both aligned, right? So despite converting these into the signature
1,071.04
1,084.72
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1078.72
vectors, it recognizes that they are very similar. And converting these into signature vectors,
1,078.72
1,090.8
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1084.72
it still recognizes that they are reasonably similar. So that's good. That's what we want.
1,084.72
1,099.92
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1090.8
Now the final step in our whole LHS process is the LHS function itself.
1,090.8
1,109.76
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1101.2
So this is essentially what it does. So we have our signature over here, which we built using the
1,101.2
1,116.96
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1109.76
steps that we just went through, which you can see here. And from that signature, we take a certain
1,109.76
1,126.32
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1116.96
number of equal length subvectors. So we define that using this here, this b. So b is 3. So that
1,116.96
1,134.96
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1126.32
means we split a signature into three different subvectors, which we see over here. And ideally,
1,126.32
1,143.28
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1134.96
what we want to be doing here is saying, okay, we process our subvectors each through a,
1,134.96
1,148.24
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1143.8400000000001
either a different hash function or it can be the same hash function, just as long as we use that
1,143.84
1,154.32
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1148.24
same hash function for the equivalent subvector in another signature, which you'll see in a moment,
1,148.24
1,160.32
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1154.32
it'll make sense. And once we have multiple signatures going together through those hash
1,154.32
1,166.72
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1160.32
functions, you can see here that they're equivalent on both sides, hash one, hash one here. These can
1,160.32
1,170.96
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1166.72
all just be a single hash function as well, which is what we're going to do. We're not really going
1,166.72
1,178.32
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1170.96
to use a hash function. And what we get here is three opportunities to identify these signatures
1,170.96
1,186.32
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1178.32
as being potential candidate pairs, which is where we consider it for further similarity
1,178.32
1,194.32
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1186.32
comparisons. In this case, hash threes both collide down here. So we say, okay, that means that a
1,186.32
1,207.2
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1195.9199999999998
and b are candidate pairs. I'm just going to put cand pairs. So this act of splitting our
1,195.92
1,212.24
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1207.2
signatures up into multiple subvectors just gives us more opportunities to identify similarities
1,207.2
1,219.68
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1212.24
because if we were to use the full vectors, the full vector would have to be very similar
1,212.24
1,226.64
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1219.68
for them to be put into the same hash bucket. With this, we only part of it to be very similar. So
1,219.68
1,232.8
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1226.64
increases the chances of us finding those similar signatures. So we're going to implement a very
1,226.64
1,238.8
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1232.8
simple version of this. I'm going to keep this very simple. Here we're just splitting our signature
1,232.8
1,245.36
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1238.8
vector. So we add our signature and b, which is the number of bands. And the first thing we do is
1,238.8
1,253.04
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1245.36
just make sure that our signature can be split into b bands equally. So where we take the remainder
1,245.36
1,259.44
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1253.04
after the division here, it must be equal to zero. And then we say we need to calculate the rows. So
1,253.04
1,265.84
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1259.44
the number of rows within each band, which obviously just the length of the signature divided by b.
1,259.44
1,275.28
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1265.84
And then we initialize a subvector array or list. And then we loop through and append subvectors.
1,265.84
1,284.88
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1275.28
Really simple, simple implementation. And let's apply that to b and c. So we have said
1,275.28
1,296.08
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1284.88
that we want 10 bands. So we only have 20 items or 20 numbers within our signature vectors. So
1,284.88
1,303.52
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1296.0800000000002
obviously we only get bands of two rows at a time. And we should find that at least one of those
1,296.08
1,312.72
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1303.5200000000002
match. So what we do is we loop through and we say if b rows equals c rows, break. Okay. And we
1,303.52
1,319.84
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1312.72
find very quickly that there is a candidate pair there. So that means that b and c, the full vectors
1,312.72
1,328.16
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1319.84
will be considered as a candidate pair. Let's do the same for a. And we should find, okay, so for
1,319.84
1,334
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1328.16
both a and b and a and c, it's not considered a candidate pair because there's just no similarity
1,328.16
1,342.16
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1334.0
there. So that's good. That's exactly what we wanted to happen. So we can now see that
1,334
1,351.76
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1342.16
that is our implementation of this. So the LSH, traditional LSH approach. Now a few other things
1,342.16
1,360.8
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1352.3200000000002
that we haven't covered, but we should just touch on quickly. And you can find, so there's an article
1,352.32
1,366.16
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1360.8000000000002
link in the description that which covers this. I walked through all of this and there will also be
1,360.8
1,371.12
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1366.16
a notebook where I'm getting these results from in the first place. So you can also look at that.
1,366.16
1,378.64
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1371.12
That includes the NumPy implementations of what we've just done, which is slightly more efficient,
1,371.12
1,386.88
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1378.6399999999999
although not super efficient because I want it to still be readable. So what we have here is
1,378.64
1,393.84
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1386.8799999999999
visualization shows the similarity, the cosine similarity of our signature vectors and whether
1,386.88
1,405.44
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1393.84
they were considered as candidate pairs or not. So these up here, these are our candidate pairs.
1,393.84
1,410.96
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1405.4399999999998
This is just a random sample. I think the actual full dataset is really big. So running this,
1,405.44
1,416.16
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1410.9599999999998
all of them is super inefficient because we're also running everything else through. So I can
1,410.96
1,423.04
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1416.1599999999999
just have the visualization here. But if you run just that on it, it does work. It's fine.
1,416.16
1,428.64
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1423.04
So at the top there, we have our candidates. At the bottom, we have our non-candidates.
1,423.04
1,432.96
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1428.6399999999999
We have some like, so we can see that high similarity does correlate with them being
1,428.64
1,440
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1432.96
classified as candidate pairs, which is good. It's obviously what we want. And there is this formula
1,432.96
1,448.64
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1440.0
that I did not write down, which I should have done, which is P equals one minus one minus S,
1,440
1,455.04
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1448.64
which is our similarity down here to the power of R, which is the number of rows in each band.
1,448.64
1,463.44
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1455.0400000000002
And all of this to the power of B, which is number of bands. Now that correlates to this
1,455.04
1,470
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1464.16
line here, this probability. Obviously it's P, capital P. So that's where it's coming from.
1,464.16
1,477.36
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1470.72
And if we run this with different similarity values, this is the pattern that we get.
1,470.72
1,483.12
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1477.36
And obviously that correlates, you can see, with whether something is classified as a candidate
1,477.36
1,493.6
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1483.12
pair or not. And what we can do is we can modify B to push the number of candidate pair
1,483.12
1,501.12
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1493.6
classifications either up or down. So here we have different B values. The side we have black,
1,493.6
1,510.24
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1501.12
which is 50. Then we go 25, 20, which is what we used before, and five. So let's say we found that
1,501.12
1,515.28
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1510.2399999999998
we're not identifying enough candidate pairs. We could push that down a little bit. Maybe we don't
1,510.24
1,523.2
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1515.28
do too much. So we could change B from 20 to 25. And if we do that, we see this. So in green, you
1,515.28
1,530.8
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1523.1999999999998
have our old results and our old probability line. And then in blue and pink, we have the new ones
1,523.2
1,541.52
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1530.8
again, or blue and magenta. So what we see here is we've pushed that down. So we've changed B to 25.
1,530.8
1,549.52
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1541.52
And now we're returning more results. So over here, we have these, for example, which we were
1,541.52
1,556
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1549.52
not returning before. And there are also more values in here as well. And there are less values
1,549.52
1,565.2
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1556.0
down here. So that's the result of us modifying B. So we can visualize that like so. So if we
1,556
1,577.2
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1569.2
increase B, we move it in this direction, which increases the number of candidate pairs,
1,569.2
1,582.48
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1577.2
which also increases the number of false positives that we're going to return. This line, by the way,
1,577.2
1,587.84
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1582.48
is our threshold. So similarity threshold is basically where we want the cutoff to be between
1,582.48
1,592.8
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1587.84
things being identified as candidate pairs and not candidate pairs. It's like our target almost.
1,587.84
1,600.48
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1593.52
Or if we wanted to reduce the number of candidate pairs, because maybe we're getting too many false
1,593.52
1,608.24
Locality Sensitive Hashing (LSH) for Search with Shingling + MinHashing (Python)
2021-08-20 16:00:16 UTC
https://youtu.be/e_SBq3s20M8
e_SBq3s20M8
UCv83tO5cePwHMt1952IVVHw
e_SBq3s20M8-t1600.48
positives, we can push it this way, which will result in less candidate pairs, but also results
1,600.48
1,617.28