// Since the majority of the base classifiers selected predicts class 0, the final decision of the ensemble should be 0.
def test_classify_instance():
query = np.atleast_2d([1, -1])
clustering_test = DESClustering(create_pool_classifiers() * 4, k=2)
clustering_test.select = MagicMock(return_value=[0, 1, 2, 3, 5, 6, 7, 9])
predictions = []
After Change
// Since the majority of the base classifiers selected predicts class 0, the final decision of the ensemble should be 0.
def test_classify_instance():
query = np.ones((1, 2))
clustering_test = DESClustering(create_pool_classifiers() * 4, k=2)
clustering_test.select = MagicMock(return_value=[0, 1, 2, 3, 5, 6, 7, 9])
predictions = []