Skip to content

[BUG] LeftSTAMPi output has incorrect shape #2819

Open
@MatthewMiddlehurst

Description

@MatthewMiddlehurst

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    anomaly detectionAnomaly detection packagebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions