Skip to content

Commit

Permalink
enhance augmented dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
qbarthelemy committed Jan 31, 2024
1 parent 1b03827 commit a6537ec
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions moabb/pipelines/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,17 @@ def fit(self, X: ndarray, y: ndarray):

def transform(self, X: ndarray):
if self.order == 1:
X_fin: ndarray = X
X_new: ndarray = X
else:
X_p = X[:, :, : -self.order * self.lag]
X_p = concatenate(
[X_p]
+ [
X[:, :, p * self.lag : -(self.order - p) * self.lag]
for p in range(1, self.order)
X_new = np.concatenate(
[
X[:, :, p * self.lag: -(self.order - p) * self.lag]
for p in range(0, self.order)
],
axis=1,
)
X_fin = X_p

return X_fin
return X_new


class StandardScaler_Epoch(BaseEstimator, TransformerMixin):
Expand Down

0 comments on commit a6537ec

Please sign in to comment.