Skip to content

[BUG] LeftSTAMPi output has incorrect shape #2819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
MatthewMiddlehurst opened this issue May 18, 2025 · 0 comments
Open

[BUG] LeftSTAMPi output has incorrect shape #2819

MatthewMiddlehurst opened this issue May 18, 2025 · 0 comments
Labels
anomaly detection Anomaly detection package bug Something isn't working

Comments

@MatthewMiddlehurst
Copy link
Member

Describe the bug

Length of the output should be the same as n_timepoints, seems to be smaller in reality. This causes check_series_anomaly_detector_output to fail. Currently skipped with "LeftSTAMPi": ["check_series_anomaly_detector_output"] in testing_config.

Steps/Code to reproduce the bug

CI output:

estimator = LeftSTAMPi(), datatype = 'UnivariateSeries-None'

    def check_series_anomaly_detector_output(estimator, datatype):
        """Test the series anomaly detector output on valid data."""
        estimator = _clone_estimator(estimator)
    
        estimator.fit(
            FULL_TEST_DATA_DICT[datatype]["train"][0],
            FULL_TEST_DATA_DICT[datatype]["train"][1],
        )
    
        y_pred = estimator.predict(FULL_TEST_DATA_DICT[datatype]["test"][0])
        assert isinstance(y_pred, np.ndarray)
        # series need n_timepoints predictions
>       assert len(y_pred) == FULL_TEST_DATA_DICT[datatype]["test"][0].shape[1]
E       AssertionError

datatype   = 'UnivariateSeries-None'
estimator  = LeftSTAMPi()
y_pred     = array([0.        , 0.        , 0.        , 0.03453322, 0.07458139,
       0.40225739, 0.78719632, 0.95601876, 0.865249...93, 0.22668   , 0.19543261, 0.08394415, 0.05453156,
       0.07175253, 0.04052627, 0.03479472, 0.02411278, 0.04349395])

Expected results

Test does not fail.

Actual results

Test fails.

Versions

No response

@MatthewMiddlehurst MatthewMiddlehurst added bug Something isn't working anomaly detection Anomaly detection package labels May 18, 2025
@SebastianSchmidl SebastianSchmidl changed the title [BUG] LeftSTAMPi output is incorrect shape [BUG] LeftSTAMPi output has incorrect shape May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
anomaly detection Anomaly detection package bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant