Ejemplo n.º 1
0
 def testClusteringSampleSimple1Euclidean(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1,
                                   2,
                                   1.0, [5, 5],
                                   True,
                                   metric=distance_metric(
                                       type_metric.EUCLIDEAN))
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1,
                                   2,
                                   10.0, [10],
                                   True,
                                   metric=distance_metric(
                                       type_metric.EUCLIDEAN))
Ejemplo n.º 2
0
 def testClusteringSampleSimple1Chebyshev(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1,
                                   2,
                                   1.0, [5, 5],
                                   True,
                                   metric=distance_metric(
                                       type_metric.CHEBYSHEV))
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1,
                                   2,
                                   10.0, [10],
                                   True,
                                   metric=distance_metric(
                                       type_metric.CHEBYSHEV))
Ejemplo n.º 3
0
 def testClusteringSampleSimple1Manhattan(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1,
                                   2,
                                   1.0, [5, 5],
                                   True,
                                   metric=distance_metric(
                                       type_metric.MANHATTAN))
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1,
                                   2,
                                   10.0, [10],
                                   True,
                                   metric=distance_metric(
                                       type_metric.MANHATTAN))
Ejemplo n.º 4
0
 def testClusteringSampleSimple1(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 1.0,
                                   [5, 5], True)
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 10, 1.0,
                                   [5, 5], True)
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 10.0,
                                   [10], True)
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 1, 1.0,
                                   [10], True)
Ejemplo n.º 5
0
 def testTheSamePoints1(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE12, 3, 1.0,
                                   [5, 5, 5], True)
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE12, 30, 1.0,
                                   [5, 5, 5], True)
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE12, 3, 10.0,
                                   [15], True)
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE12, 1, 1.0,
                                   [15], True)
Ejemplo n.º 6
0
 def testClusteringSampleSimple3(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE3, 4, 1.0,
                                   [2, 8, 20, 30], True)
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE3, 4, 2.0,
                                   [10, 10, 10, 30], True)
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE3, 4, 10.0,
                                   [60], True)
Ejemplo n.º 7
0
 def testClusteringSampleSimple1EuclideanSquare(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1,
                                   2,
                                   1.0, [5, 5],
                                   False,
                                   metric=distance_metric(
                                       type_metric.EUCLIDEAN_SQUARE))
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1,
                                   2,
                                   10.0, [5, 5],
                                   False,
                                   metric=distance_metric(
                                       type_metric.EUCLIDEAN_SQUARE))
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1,
                                   2,
                                   100.0, [10],
                                   False,
                                   metric=distance_metric(
                                       type_metric.EUCLIDEAN_SQUARE))
Ejemplo n.º 8
0
 def testThreeDimentionalPoints(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE11, 2, 1.0,
                                   [10, 10], True)
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE11, 2, 10.0,
                                   [20], True)
Ejemplo n.º 9
0
 def testOneDimentionalPoints2(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE9, 2, 1.0,
                                   [10, 20], True)
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE9, 2, 10.0,
                                   [30], True)
Ejemplo n.º 10
0
 def testOneDimentionalPoints1(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE7, 2, 1.0,
                                   [10, 10], False)
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE7, 2, 10.0,
                                   [20], False)
Ejemplo n.º 11
0
 def testClusteringSampleSimple1EuclideanSquare(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 1.0, [5, 5], True, metric=distance_metric(type_metric.EUCLIDEAN_SQUARE));
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 10.0, [5, 5], True, metric=distance_metric(type_metric.EUCLIDEAN_SQUARE));
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 100.0, [10], True, metric=distance_metric(type_metric.EUCLIDEAN_SQUARE));
Ejemplo n.º 12
0
 def testProcessingWhenLibraryCoreCorrupted(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 1.0,
                                   [5, 5], True)
Ejemplo n.º 13
0
 def testProcessingWhenLibraryCoreCorrupted(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 1.0, [5, 5], True);
Ejemplo n.º 14
0
 def testOneDimentionalPoints2(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE9, 2, 1.0, [10, 20], True);
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE9, 2, 10.0, [30], True);
Ejemplo n.º 15
0
 def testClusteringSampleSimple3(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE3, 4, 1.0, [2, 8, 20, 30], True);
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE3, 4, 2.0, [10, 10, 10, 30], True);
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE3, 4, 10.0, [60], True);
Ejemplo n.º 16
0
 def testClusteringSampleSimple2(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE2, 3, 1.0, [5, 8, 10], True);
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE2, 3, 10.0, [23], True);
Ejemplo n.º 17
0
 def testClusteringSampleSimple1Chebyshev(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 1.0, [5, 5], True, metric=distance_metric(type_metric.CHEBYSHEV));
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 10.0, [10], True, metric=distance_metric(type_metric.CHEBYSHEV));
Ejemplo n.º 18
0
 def testClusteringSampleSimple1Manhattan(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 1.0, [5, 5], True, metric=distance_metric(type_metric.MANHATTAN));
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 10.0, [10], True, metric=distance_metric(type_metric.MANHATTAN));
Ejemplo n.º 19
0
 def runRemovedLibraryCoreTest(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 1.0,
                                   [5, 5], True)
Ejemplo n.º 20
0
 def testTheSamePoints2(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE9, 3, 1.0,
                                   [10, 20], True)
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE9, 3, 10.0,
                                   [30], True)
Ejemplo n.º 21
0
 def testOneDimentionalPoints1(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE7, 2, 1.0, [10, 10], False);
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE7, 2, 10.0, [20], False);
Ejemplo n.º 22
0
 def testThreeDimentionalPoints(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE11, 2, 1.0, [10, 10], True);
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE11, 2, 10.0, [20], True);
Ejemplo n.º 23
0
 def testClusteringSampleSimple1(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 1.0, [5, 5], True);
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 10, 1.0, [5, 5], True);
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 10.0, [10], True);
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 1, 1.0, [10], True);
Ejemplo n.º 24
0
 def testTheSamePoints1(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE12, 3, 1.0, [5, 5, 5], True);
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE12, 30, 1.0, [5, 5, 5], True);
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE12, 3, 10.0, [15], True);
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE12, 1, 1.0, [15], True);
Ejemplo n.º 25
0
 def testTheSamePoints2(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE9, 3, 1.0, [10, 20], True);
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE9, 3, 10.0, [30], True);
Ejemplo n.º 26
0
 def testClusteringSampleSimple2(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE2, 3, 1.0,
                                   [5, 8, 10], True)
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE2, 3, 10.0,
                                   [23], True)
Ejemplo n.º 27
0
 def testClusteringSampleSimple1Euclidean(self):
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 1.0, [5, 5], False, metric=distance_metric(type_metric.EUCLIDEAN));
     bsas_test_template.clustering(SIMPLE_SAMPLES.SAMPLE_SIMPLE1, 2, 10.0, [10], False, metric=distance_metric(type_metric.EUCLIDEAN));