Exemplo n.º 1
0
def test_labeller_with_percentage():
    size = 6
    n_steps_future = 1
    labeller = Labeller(size=size,
                        func=np.max,
                        func_params={},
                        percentiles=[100],
                        n_steps_future=n_steps_future)
    labeller.fit(X)
    assert np.max(X) == labeller.thresholds_[0]
Exemplo n.º 2
0
def test_labeller_params(size):
    labeller = Labeller(size=size)
    with pytest.raises(ValueError):
        labeller.fit(signal)