-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] Make transformer files private (#2072)
* remove Theta * take some private * import * revert Interpolator * softdep * hog1D * API * Revert "API" This reverts commit 428900b. * API * API * API * take collection transformers private * docstring * tidy * remove unused function * remove unused function * examples * docstrings * revert things
- Loading branch information
1 parent
0dd8eee
commit a15250e
Showing
28 changed files
with
199 additions
and
350 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"""Test for incorrect input for ARCoefficientTransformer transformer.""" | ||
|
||
import numpy as np | ||
import pytest | ||
|
||
from aeon.transformations.collection import AutocorrelationFunctionTransformer | ||
|
||
|
||
def test_acf(): | ||
"""Test ACF Transformer exceptions.""" | ||
X = np.random.random((2, 1, 10)) | ||
acf = AutocorrelationFunctionTransformer(n_lags=100) | ||
with pytest.raises(ValueError, match=r"must be smaller than n_timepoints - 1"): | ||
acf.fit_transform(X) |
28 changes: 28 additions & 0 deletions
28
aeon/transformations/collection/tests/test_ar_coefficient.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""Test for incorrect input for ARCoefficientTransformer transformer.""" | ||
|
||
import numpy as np | ||
import pytest | ||
|
||
from aeon.transformations.collection import ARCoefficientTransformer | ||
from aeon.utils.validation._dependencies import _check_soft_dependencies | ||
|
||
|
||
@pytest.mark.skipif( | ||
not _check_soft_dependencies("statsmodels", severity="none"), | ||
reason="skip test if required soft dependency statsmodels not available", | ||
) | ||
def test_ar_coefficient(): | ||
"""Test AR Coefficient Transformer exceptions.""" | ||
X = np.random.random((2, 1, 10)) | ||
ar = ARCoefficientTransformer(order=0) | ||
Xt = ar.fit_transform(X) | ||
assert Xt.shape[2] == 1 | ||
ar = ARCoefficientTransformer(order=-10) | ||
Xt = ar.fit_transform(X) | ||
assert Xt.shape[2] == 1 | ||
ar = ARCoefficientTransformer(order=100) | ||
with pytest.raises(ValueError, match=r"must be smaller than n_timepoints - 1"): | ||
ar.fit_transform(X) | ||
ar = ARCoefficientTransformer(order=6, min_values=5) | ||
Xt = ar.fit_transform(X) | ||
assert Xt.shape[2] == 5 |
Oops, something went wrong.