Skip to content
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

Arima pipeline value error #591

Open
LuSchnitt opened this issue Nov 27, 2024 · 1 comment
Open

Arima pipeline value error #591

LuSchnitt opened this issue Nov 27, 2024 · 1 comment
Labels
question Further information is requested

Comments

@LuSchnitt
Copy link

  • Orion version: 0.6.1
  • Python version: 3.11.10
    3* Operating System: Ubuntu 24.04.1 LTS

statsmodels version: 0.14.4

Description

I want to use arima as my baseline model but i got an error while detecting the anomalies.
My multivarait dataset gets an value error when trying to detect anomalies. Tried to test with the multivariat tutorial:
https://github.com/sintel-dev/Orion/blob/master/tutorials/Orion_with_Multivariate_Input.ipynb

Error-Traceback:

ValueError                                Traceback (most recent call last)
Cell In[8], line 1
----> 1 orion.detect(data)

File ~/anaconda3/envs/orion_env/lib/python3.11/site-packages/orion/core.py:175, in Orion.detect(self, data, visualization)
    153 def detect(self, data: pd.DataFrame, visualization: bool = False) -> pd.DataFrame:
    154     """Detect anomalies in the given data..
    155 
    156     If ``visualization=True``, also return the visualization
   (...)
    173             visualization outputs dict.
    174     """
--> 175     return self._detect(self._mlpipeline.predict, data, visualization)

File ~/anaconda3/envs/orion_env/lib/python3.11/site-packages/orion/core.py:138, in Orion._detect(self, method, data, visualization, **kwargs)
    135 else:
    136     outputs_spec = 'default'
--> 138 outputs = method(data, output_=outputs_spec, **kwargs)
    140 if visualization:
    141     if visualization_names:

File ~/anaconda3/envs/orion_env/lib/python3.11/site-packages/mlblocks/mlpipeline.py:913, in MLPipeline.predict(self, X, output_, start_, debug, **kwargs)
    910         LOGGER.debug('Skipping block %s produce', block_name)
    911         continue
--> 913 self._produce_block(block, block_name, context, output_variables, outputs, debug_info)
    915 # We already captured the output from this block
    916 if block_name in output_blocks:

File ~/anaconda3/envs/orion_env/lib/python3.11/site-packages/mlblocks/mlpipeline.py:679, in MLPipeline._produce_block(self, block, block_name, context, output_variables, outputs, debug_info)
    677 memory_before = process.memory_info().rss
    678 start = datetime.utcnow()
--> 679 block_outputs = block.produce(**produce_args)
    680 elapsed = datetime.utcnow() - start
    681 memory_after = process.memory_info().rss

File ~/anaconda3/envs/orion_env/lib/python3.11/site-packages/mlblocks/mlblock.py:334, in MLBlock.produce(self, **kwargs)
    331     return getattr(self.instance, self.produce_method)(**produce_kwargs)
    333 produce_kwargs.update(self.get_hyperparameters())
--> 334 return self.primitive(**produce_kwargs)

File ~/anaconda3/envs/orion_env/lib/python3.11/site-packages/orion/primitives/timeseries_errors.py:41, in regression_errors(y, y_hat, smoothing_window, smooth, masking_window, mask)
     13 def regression_errors(y, y_hat, smoothing_window=0.01, smooth=True,
     14                       masking_window=0.01, mask=False):
     15     """Compute an array of absolute errors comparing predictions and expected output.
     16 
     17     If smooth is True, apply EWMA to the resulting array of errors.
   (...)
     39             Array of errors.
     40     """
---> 41     errors = np.abs(y - y_hat)[:, 0]
     43     if not smooth:
     44         return errors

ValueError: operands could not be broadcast together with shapes (9899,1) (247475,1) 

What I Did

I got the same error (different shapes) for my dataset, the s-1 dataset (univariat and multivariat)

Also the detect process gives hundreds if warnings like:

/home/medusa/anaconda3/envs/orion_env/lib/python3.11/site-packages/statsmodels/base/model.py:607: ConvergenceWarning: Maximum Likelihood optimization failed to converge. Check mle_retvals
  warnings.warn("Maximum Likelihood optimization failed to "
/home/medusa/anaconda3/envs/orion_env/lib/python3.11/site-packages/statsmodels/base/model.py:607: ConvergenceWarning: Maximum Likelihood optimization failed to converge. Check mle_retvals
  warnings.warn("Maximum Likelihood optimization failed to "
/home/medusa/anaconda3/envs/orion_env/lib/python3.11/site-packages/statsmodels/base/model.py:607: ConvergenceWarning: Maximum Likelihood optimization failed to converge. Check mle_retvals

Trying to solve problem with searching for solutions wasnt helpful.

@sarahmish
Copy link
Collaborator

Thanks @LuSchnitt! ARIMA model only supports univariate time series right now.

The warnings you see are expected when the modeling fails to converge, this is true from S-1.

@sarahmish sarahmish added the question Further information is requested label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants