diff --git a/aeon/transformations/collection/base.py b/aeon/transformations/collection/base.py index a69f642ca9..a2e6a36b7e 100644 --- a/aeon/transformations/collection/base.py +++ b/aeon/transformations/collection/base.py @@ -29,7 +29,6 @@ class name: BaseCollectionTransformer import numpy as np import pandas as pd -from deprecated.sphinx import deprecated from aeon.base import BaseCollectionEstimator from aeon.transformations.base import BaseTransformer @@ -273,80 +272,6 @@ def inverse_transform(self, X, y=None): return Xt - # TODO: remove in v0.11.0 - @deprecated( - version="0.10.0", - reason="The update method will be removed in version 0.11.0.", - category=FutureWarning, - ) - @final - def update(self, X, y=None, update_params=True): - """Update transformer with X, optionally y. - - State required: - Requires state to be "fitted". - - Accesses in self: - _is_fitted : must be True - fitted model attributes (ending in "_") : must be set, accessed by _update - - Writes to self: - _X : set to be X, if remember_data tag is True, potentially used in _update - fitted model attributes (ending in "_") : only if update_params=True - type and nature of update are dependent on estimator - - Parameters - ---------- - X : np.ndarray or list - Input data, any number of channels, equal length series of shape ``( - n_cases, n_channels, n_timepoints)`` - or list of numpy arrays (any number of channels, unequal length series) - of shape ``[n_cases]``, 2D np.array ``(n_channels, n_timepoints_i)``, - where ``n_timepoints_i`` is length of series ``i``. Other types are - allowed and converted into one of the above. - - Different estimators have different capabilities to handle different - types of input. If `self.get_tag("capability:multivariate")`` is False, - they cannot handle multivariate series. If ``self.get_tag( - "capability:unequal_length")`` is False, they cannot handle unequal - length input. In both situations, a ``ValueError`` is raised if X has a - characteristic that the estimator does not have the capability to handle. - Data to fit transform to, of valid collection type. - y : np.ndarray, default=None - 1D np.array of float or str, of shape ``(n_cases)`` - class labels - (ground truth) for fitting indices corresponding to instance indices in X. - If None, no labels are used in fitting. - update_params : bool, default=True - whether the model is updated. Yes if true, if false, simply skips call. - argument exists for compatibility with forecasting module. - - Returns - ------- - self : a fitted instance of the estimator - """ - # check whether is fitted - self.check_is_fitted() - - # if requires_y is set, y is required in fit and update - if self.get_tag("requires_y") and y is None: - raise ValueError(f"{self.__class__.__name__} requires `y` in `update`.") - - # check and convert X/y - X_inner = self._preprocess_collection(X, store_metadata=False) - y_inner = y - - # update memory of X, if remember_data exists and is set to True - if self.get_tag("remember_data", tag_value_default=False): - self._X = X_inner - - # skip everything if update_params is False or fit_is_empty is present and True - if not update_params or self.get_tag("fit_is_empty", tag_value_default=False): - return self - - self._update(X=X_inner, y=y_inner) - - return self - def _fit(self, X, y=None): """Fit transformer to X and y.