From 0961796918c9debd16a61544f912e5a571825c50 Mon Sep 17 00:00:00 2001 From: ISHOOO Date: Wed, 26 Mar 2025 02:14:05 +0530 Subject: [PATCH 1/4] [DOC] fixed double tick inconsistencies in docstrings --- aeon/classification/dictionary_based/_redcomets.py | 2 +- aeon/classification/dictionary_based/_tde.py | 6 +++--- aeon/classification/dictionary_based/_weasel.py | 8 ++++---- aeon/classification/dictionary_based/_weasel_v2.py | 8 ++++---- .../distance_based/tests/test_elastic_ensemble.py | 2 +- aeon/classification/feature_based/_catch22.py | 2 +- aeon/classification/hybrid/_hivecote_v1.py | 2 +- aeon/classification/hybrid/_hivecote_v2.py | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/aeon/classification/dictionary_based/_redcomets.py b/aeon/classification/dictionary_based/_redcomets.py index 601f573bdf..6a716acf21 100644 --- a/aeon/classification/dictionary_based/_redcomets.py +++ b/aeon/classification/dictionary_based/_redcomets.py @@ -49,7 +49,7 @@ class REDCOMETS(BaseClassifier): ``-1`` means using all processors. parallel_backend : str, ParallelBackendBase instance or None, default=None Specify the parallelisation backend implementation in joblib, - if ``None`` a 'prefer' value of "threads" is used by default. + if ``None`` a ``prefer`` value of "threads" is used by default. Valid options are "loky", "multiprocessing", "threading" or a custom backend. See the joblib Parallel documentation for more details. diff --git a/aeon/classification/dictionary_based/_tde.py b/aeon/classification/dictionary_based/_tde.py index ba3eae07a5..991e6bc6b4 100644 --- a/aeon/classification/dictionary_based/_tde.py +++ b/aeon/classification/dictionary_based/_tde.py @@ -32,9 +32,9 @@ class TemporalDictionaryEnsemble(BaseClassifier): Implementation of the dictionary based Temporal Dictionary Ensemble as described in [1]_. - Overview: Input 'n' series length 'm' with 'd' dimensions - TDE searches 'k' parameter values selected using a Gaussian processes - regressor, evaluating each with a LOOCV. It then retains 's' + Overview: Input ``n`` series length ``m`` with ``d`` dimensions + TDE searches ``k`` parameter values selected using a Gaussian processes + regressor, evaluating each with a LOOCV. It then retains ``s`` ensemble members. There are six primary parameters for individual classifiers: - alpha: alphabet size diff --git a/aeon/classification/dictionary_based/_weasel.py b/aeon/classification/dictionary_based/_weasel.py index 03b86a8c17..dceeac9fdb 100644 --- a/aeon/classification/dictionary_based/_weasel.py +++ b/aeon/classification/dictionary_based/_weasel.py @@ -23,7 +23,7 @@ class WEASEL(BaseClassifier): """ Word Extraction for Time Series Classification (WEASEL). - As described in [1]_. Overview: Input 'n' series length 'm' + As described in [1]_. Overview: Input ``n`` series length ``m`` WEASEL is a dictionary classifier that builds a bag-of-patterns using SFA for different window lengths and learns a logistic regression classifier on this bag. @@ -74,10 +74,10 @@ class WEASEL(BaseClassifier): Sets the feature selections strategy to be used. One of {"chi2", "none", "random"}. Large amounts of memory may beneeded depending on the setting of bigrams (true is more) or alpha (larger is more). - 'chi2' reduces the number of words, keeping those above the 'p_threshold'. - 'random' reduces the number to at most 'max_feature_count', + ``chi2`` reduces the number of words, keeping those above the ``p_threshold``. + ``random`` reduces the number to at most ``max_feature_count``, by randomly selecting features. - 'none' does not apply any feature selection and yields large bag of words. + ``none`` does not apply any feature selection and yields large bag of words. support_probabilities : bool, default: False If set to False, a RidgeClassifierCV will be trained, which has higher accuracy and is faster, yet does not support predict_proba. diff --git a/aeon/classification/dictionary_based/_weasel_v2.py b/aeon/classification/dictionary_based/_weasel_v2.py index b8d014a089..553fd974f3 100644 --- a/aeon/classification/dictionary_based/_weasel_v2.py +++ b/aeon/classification/dictionary_based/_weasel_v2.py @@ -34,7 +34,7 @@ class WEASEL_V2(BaseClassifier): """ Word Extraction for Time Series Classification (WEASEL) v2.0. - Overview: Input 'n' series length 'm' + Overview: Input ``n`` series length ``m`` WEASEL is a dictionary classifier that builds a bag-of-patterns using SFA for different window lengths and learns a logistic regression classifier on this bag. @@ -72,11 +72,11 @@ class WEASEL_V2(BaseClassifier): Sets the feature selections strategy to be used. Options from {"chi2_top_k", "none", "random"}. Large amounts of memory may be needed depending on the setting of bigrams (true is more) or alpha (larger is more). - 'chi2_top_k' reduces the number of words to at most 'max_feature_count', + ``chi2_top_k`` reduces the number of words to at most 'max_feature_count', dropping values based on p-value. - 'random' reduces the number to at most 'max_feature_count', by randomly + ``random`` reduces the number to at most ``max_feature_count``, by randomly selecting features. - 'none' does not apply any feature selection and yields large bag of words + ``none`` does not apply any feature selection and yields large bag of words max_feature_count : int, default=30_000 size of the dictionary - number of words to use - if feature_selection set to "chi2" or "random". Else ignored. diff --git a/aeon/classification/distance_based/tests/test_elastic_ensemble.py b/aeon/classification/distance_based/tests/test_elastic_ensemble.py index 53215dad2f..6605e99a31 100644 --- a/aeon/classification/distance_based/tests/test_elastic_ensemble.py +++ b/aeon/classification/distance_based/tests/test_elastic_ensemble.py @@ -83,7 +83,7 @@ def test_proportion_train_in_param_finding(): def test_all_distance_measures(): - """Test the 'all' option of the distance_measures parameter.""" + """Test the ``all`` option of the distance_measures parameter.""" X = np.random.random(size=(10, 1, 10)) y = np.array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1]) ee = ElasticEnsemble(distance_measures="all", proportion_train_in_param_finding=0.2) diff --git a/aeon/classification/feature_based/_catch22.py b/aeon/classification/feature_based/_catch22.py index bec5deff88..8a4e1f4a36 100644 --- a/aeon/classification/feature_based/_catch22.py +++ b/aeon/classification/feature_based/_catch22.py @@ -64,7 +64,7 @@ class Catch22Classifier(BaseClassifier): ``-1`` means using all processors. parallel_backend : str, ParallelBackendBase instance or None, default=None Specify the parallelisation backend implementation in joblib for Catch22, - if None a 'prefer' value of "threads" is used by default. + if None a ``prefer`` value of "threads" is used by default. Valid options are "loky", "multiprocessing", "threading" or a custom backend. See the joblib Parallel documentation for more details. class_weight{“balanced”, “balanced_subsample”}, dict or list of dicts, default=None diff --git a/aeon/classification/hybrid/_hivecote_v1.py b/aeon/classification/hybrid/_hivecote_v1.py index 22925487a6..73ad1f4a94 100644 --- a/aeon/classification/hybrid/_hivecote_v1.py +++ b/aeon/classification/hybrid/_hivecote_v1.py @@ -60,7 +60,7 @@ class HIVECOTEV1(BaseClassifier): ``-1`` means using all processors. parallel_backend : str, ParallelBackendBase instance or None, default=None Specify the parallelisation backend implementation in joblib for Catch22, - if None a 'prefer' value of "threads" is used by default. + if None a ``prefer`` value of "threads" is used by default. Valid options are "loky", "multiprocessing", "threading" or a custom backend. See the joblib Parallel documentation for more details. diff --git a/aeon/classification/hybrid/_hivecote_v2.py b/aeon/classification/hybrid/_hivecote_v2.py index f53167cc8a..bedb9de851 100644 --- a/aeon/classification/hybrid/_hivecote_v2.py +++ b/aeon/classification/hybrid/_hivecote_v2.py @@ -59,7 +59,7 @@ class HIVECOTEV2(BaseClassifier): ``-1`` means using all processors. parallel_backend : str, ParallelBackendBase instance or None, default=None Specify the parallelisation backend implementation in joblib for Catch22, - if None a 'prefer' value of "threads" is used by default. + if None a ``prefer`` value of "threads" is used by default. Valid options are "loky", "multiprocessing", "threading" or a custom backend. See the joblib Parallel documentation for more details. From c30b3d2df7a6a1fe54f714a50c2a2943e77ca380 Mon Sep 17 00:00:00 2001 From: ISHOOO Date: Wed, 26 Mar 2025 02:15:10 +0530 Subject: [PATCH 2/4] [DOC] fixed double tick inconsistencies in docstrings --- aeon/classification/dictionary_based/_weasel_v2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aeon/classification/dictionary_based/_weasel_v2.py b/aeon/classification/dictionary_based/_weasel_v2.py index 553fd974f3..d6520835d0 100644 --- a/aeon/classification/dictionary_based/_weasel_v2.py +++ b/aeon/classification/dictionary_based/_weasel_v2.py @@ -290,11 +290,11 @@ class WEASELTransformerV2: Sets the feature selections strategy to be used. Large amounts of memory may be needed depending on the setting of bigrams (true is more) or alpha (larger is more). - 'chi2_top_k' reduces the number of words to at most 'max_feature_count', + ``chi2_top_k`` reduces the number of words to at most ``max_feature_count``, dropping values based on p-value. - 'random' reduces the number to at most 'max_feature_count', + ``random`` reduces the number to at most ``max_feature_count``, by randomly selecting features. - 'none' does not apply any feature selection and yields large bag of words + ``none`` does not apply any feature selection and yields large bag of words max_feature_count : int, default=30_000 size of the dictionary - number of words to use - if feature_selection set to "chi2" or "random". Else ignored. From 9f82db30e0dfd513f3b30a65a18f9b741748b459 Mon Sep 17 00:00:00 2001 From: "Anant (Ishan) Gupta" <132544766+ISHOOO@users.noreply.github.com> Date: Fri, 28 Mar 2025 18:37:03 +0530 Subject: [PATCH 3/4] Update pr_precommit.yml - The checkout step in .github/workflows/pr_precommit.yml was missing the fetch-depth property. - By default, actions/checkout@v4 fetches only the latest commit (fetch-depth: 1), which prevents workflows from accessing the full commit history. - This caused issues in detecting changed files properly. - Setting fetch-depth: 0 ensures a full clone, allowing proper diff detection and resolving potential errors. --- .github/workflows/pr_precommit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr_precommit.yml b/.github/workflows/pr_precommit.yml index a74e8b12ea..e2250bd103 100644 --- a/.github/workflows/pr_precommit.yml +++ b/.github/workflows/pr_precommit.yml @@ -30,6 +30,7 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.head_ref }} token: ${{ steps.app-token.outputs.token }} + fetch-depth: 0 - name: Setup Python 3.10 uses: actions/setup-python@v5 From f59542fa48864c09be95193e08e1c030d2c01ae4 Mon Sep 17 00:00:00 2001 From: ISHOOO Date: Sun, 6 Apr 2025 01:00:26 +0530 Subject: [PATCH 4/4] fix typo: 'lcoffecients' to 'coefficients' along with a few others in tde docstrings --- aeon/classification/dictionary_based/_tde.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aeon/classification/dictionary_based/_tde.py b/aeon/classification/dictionary_based/_tde.py index 991e6bc6b4..6ccedd4854 100644 --- a/aeon/classification/dictionary_based/_tde.py +++ b/aeon/classification/dictionary_based/_tde.py @@ -46,14 +46,14 @@ class TemporalDictionaryEnsemble(BaseClassifier): For any combination, an individual TDE classifier slides a window of length w along the series. The w length window is shortened to an l length word through taking a Fourier transform and keeping the - first l/2 complex coefficients. These lcoefficients are then discretised + first l/2 complex coefficients. These coefficients are then discretised into alpha possible values, to form a word length l using breakpoints found using b. A histogram of words for each series is formed and stored, using a spatial pyramid of h levels. For multivariate series, accuracy from a reduced histogram is used to select dimensions. fit involves finding n histograms. - predict uses 1 nearest neighbour with the histogram intersection + predict uses 1 nearest neighbor with the histogram intersection distance function. Parameters @@ -645,7 +645,7 @@ class IndividualTDE(BaseClassifier): See Also -------- - TemporalDictinaryEnsemble, SFA + TemporalDictionaryEnsemble, SFA TDE extends BOSS and uses SFA. Notes