Skip to content

Commit def7adb

Browse files
committed
Corrections made as advised by Matthew
1 parent 417d3b1 commit def7adb

File tree

2 files changed

+2
-38
lines changed

2 files changed

+2
-38
lines changed

aeon/transformations/collection/shapelet_based/_rsast.py

-19
Original file line numberDiff line numberDiff line change
@@ -64,28 +64,9 @@ class RSAST(BaseCollectionTransformer):
6464
the number of reference time series to select per class
6565
seed : int, default = None
6666
the seed of the random generator
67-
estimator : sklearn compatible classifier, default = None
68-
if None, a RidgeClassifierCV(alphas=np.logspace(-3, 3, 10)) is used.
6967
n_jobs : int, default -1
7068
Number of threads to use for the transform.
7169
72-
Attributes
73-
----------
74-
_kernels : list
75-
The z-normalized subsequences used for transformation.
76-
_kernel_orig : list
77-
The original (non z-normalized) subsequences.
78-
_start_positions : list
79-
The starting positions of each subsequence within the original time series.
80-
_classes : list
81-
The class labels associated with each subsequence.
82-
_source_series: list
83-
The index of the original time series in the training set from which each
84-
subsequence was derived.
85-
_kernels_generators_ : dict
86-
A dictionary mapping class labels to the selected reference time series
87-
for that class.
88-
8970
References
9071
----------
9172
.. [1] Varela, N. R., Mbouopda, M. F., & Nguifo, E. M. (2023).

aeon/transformations/collection/shapelet_based/_sast.py

+2-19
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,6 @@ class SAST(BaseCollectionTransformer):
6060
Number of threads to use for the transform.
6161
The available CPU count is used if this value is less than 1
6262
63-
Attributes
64-
----------
65-
_kernels : list
66-
The z-normalized subsequences used for transformation.
67-
_kernel_orig : list
68-
The original (non z-normalized) subsequences.
69-
_start_positions : list
70-
The starting positions of each subsequence within the original time series.
71-
_classes : list
72-
The class labels associated with each subsequence.
73-
_source_series: list
74-
The index of the original time series in the training set from which each
75-
subsequence was derived.
76-
kernels_generators_ : dict
77-
A dictionary mapping class labels to the selected reference time series
78-
for that class.
79-
8063
8164
References
8265
----------
@@ -163,8 +146,8 @@ def _fit(self, X: np.ndarray, y: Union[np.ndarray, List]) -> "SAST":
163146
for c in classes:
164147
X_c = X_[y == c]
165148

166-
# Convert to int because if nb_inst_per_class is float,
167-
# the result of np.min() will be float
149+
# convert to int because if self.
150+
# nb_inst_per_class is float, the result of np.min() will be float
168151
cnt = np.min([self.nb_inst_per_class, X_c.shape[0]]).astype(int)
169152
choosen = self._random_state.permutation(X_c.shape[0])[:cnt]
170153
candidates_ts.append(X_c[choosen])

0 commit comments

Comments
 (0)