-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTests.cs
59 lines (55 loc) · 1.61 KB
/
Tests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
using System.Collections.Generic;
using System.Text;
namespace LogEntryClustering
{
public class Tests
{
//[TestMethod]
/*
public void MinHashFunc1()
{
var inums1 = new List<int>();
inums1.Add(10);
inums1.Add(8);
inums1.Add(11);
inums1.Add(13);
inums1.Add(2);
inums1.Add(17);
inums1.Add(3);
inums1.Add(1);
inums1.Add(19);
inums1.Add(11);
MinHash mh = new MinHash(20, 100);
var hvs1 = mh.GetMinHash(inums1).ToList();
List inums2 = new List();
inums2.Add(1);
inums2.Add(2);
inums2.Add(5);
inums2.Add(9);
inums2.Add(12);
inums2.Add(17);
inums2.Add(13);
inums2.Add(11);
inums2.Add(9);
inums2.Add(10);
List hvs2 = mh.GetMinHash(inums2).ToList();
Console.WriteLine();
Console.WriteLine("Estimated similarity: " + mh.Similarity(hvs1, hvs2));
Console.WriteLine("Jaccard similarity: " + Jaccard.Calc(inums1, inums2));
}
[TestMethod]
public void CheckLSHAll()
{
string lang = "en";
SectionBO.MinHashForSections mhfs = SectionBO.GetMinHash(4, 100, lang, 1);
LSH lsh = new LSH(mhfs.hashes, 20);
lsh.Calc();
for (int n = 0; n < mhfs.hashes.GetUpperBound(0); n++)
{
List<int> nearest = lsh.GetNearest(n);
}
}
*/
}
}