Skip to content

Commit

Permalink
[DOC] Improve BaseCollectionTransformer docstrings (#1733)
Browse files Browse the repository at this point in the history
* remove dependency

* docs
  • Loading branch information
TonyBagnall authored Jun 28, 2024
1 parent 2716e76 commit 70d9a72
Showing 1 changed file with 95 additions and 19 deletions.
114 changes: 95 additions & 19 deletions aeon/transformations/collection/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,25 @@ def fit(self, X, y=None):
Parameters
----------
X : Input data
Data to fit transform to, of valid collection type.
y : Target variable, default=None
Additional data, e.g., labels for transformation
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.
Returns
-------
Expand Down Expand Up @@ -107,10 +122,25 @@ def transform(self, X, y=None):
Parameters
----------
X : Input data
Data to fit transform to, of valid collection type.
y : Target variable, default=None
Additional data, e.g., labels for transformation
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.
Returns
-------
Expand Down Expand Up @@ -146,10 +176,25 @@ def fit_transform(self, X, y=None):
Parameters
----------
X : Input data
Data to fit transform to, of valid collection type.
y : Target variable, default=None
Additional data, e.g., labels for transformation
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.
Returns
-------
Expand Down Expand Up @@ -184,10 +229,25 @@ def inverse_transform(self, X, y=None):
Parameters
----------
X : Input data
Data to fit transform to, of valid collection type.
y : Target variable, default=None
Additional data, e.g., labels for transformation
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.
Returns
-------
Expand Down Expand Up @@ -231,9 +291,25 @@ def update(self, X, y=None, update_params=True):
Parameters
----------
X : data to update of valid collection type.
y : Target variable, default=None
Additional data, e.g., labels for transformation
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.
Expand Down

0 comments on commit 70d9a72

Please sign in to comment.