def test_dunn_regression(self): dunn_calculator = DunnCalculator() expected = [0.238095238095, 0.238095238095] for i in range(len(self.clusterings)): self.assertAlmostEqual( dunn_calculator.evaluate( self.clusterings[i], self.matrix), expected[i],6)
def test_dunn_regression(self): dunn_calculator = DunnCalculator() expected = [0.238095238095, 0.238095238095] for i in range(len(self.clusterings)): self.assertAlmostEqual( dunn_calculator.evaluate(self.clusterings[i], self.matrix), expected[i], 6)
def test_max_intercluster_distance(self): expected = [21, 21] for i in range(len(self.clusterings)): self.assertEqual( DunnCalculator.max_intercluster_distance(self.clusterings[i], self.matrix), expected[i])
def test_min_intracluster_distances(self): expected = [5, 5] for i in range(len(self.clusterings)): self.assertEqual(DunnCalculator.min_intracluster_distances(self.clusterings[i], self.matrix), expected[i])
def test_max_intercluster_distance(self): expected = [21, 21] for i in range(len(self.clusterings)): self.assertEqual( DunnCalculator.max_intercluster_distance( self.clusterings[i], self.matrix), expected[i])
def test_min_intracluster_distances(self): expected = [5, 5] for i in range(len(self.clusterings)): self.assertEqual( DunnCalculator.min_intracluster_distances( self.clusterings[i], self.matrix), expected[i])