def test_valid_selection_mode(mode, create_pool_classifiers):
    X = np.random.rand(10, 2)
    y = np.ones(10)
    with pytest.raises(ValueError):
        des = BaseDES(create_pool_classifiers, mode=mode)
        des.fit(X, y)
예제 #2
0
def test_selection_method_type(mode):
    X = np.random.rand(10, 2)
    y = np.ones(10)
    with pytest.raises(TypeError):
        des = BaseDES(create_pool_classifiers(), mode=mode)
        des.fit(X, y)