From 5c0733496e737e025fb8a25840f3906521e7d123 Mon Sep 17 00:00:00 2001 From: Johann Faouzi Date: Sat, 21 Mar 2020 13:29:44 +0100 Subject: [PATCH] Release of version 0.11.0 (#70) --- doc/changelog.rst | 8 ++- doc/conf.py | 2 +- doc/reproducibility.rst | 133 ++++++++++++++++++++++++++++++++------- pyts/__init__.py | 2 +- pyts/bag_of_words/bow.py | 2 +- setup.cfg | 2 +- 6 files changed, 122 insertions(+), 27 deletions(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index f8fa982..ad8b79b 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -7,8 +7,11 @@ Change Log Version 0.11.0 -------------- +- Add support for Python 3.8 and drop support for Python 3.5. + - Rework the *BagOfWords* algorithm to match the description of the algorithm - in the original paper. + in the original paper. The former version of *BagOfWords* is available + as *WordExtractor* in the :mod:`pyts.bag_of_words` module. - Update the *SAXVSM* classifier with the new version of *BagOfWords*. @@ -19,6 +22,9 @@ Version 0.11.0 - Add the *LearningShapelets* algorithm in the :mod:`pyts.classification` module. +- Deprecated specific functions for Dynamic Time Warping (all ``dtw_*`` functions), + only the main :func:`pyts.metrics.dtw` is kept. + Version 0.10.0 -------------- diff --git a/doc/conf.py b/doc/conf.py index 9bdb834..42360b4 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -81,7 +81,7 @@ # General information about the project. project = u'pyts' -copyright = u'2017-2019, Johann Faouzi' +copyright = u'2017-2020, Johann Faouzi' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/doc/reproducibility.rst b/doc/reproducibility.rst index 4efadf0..a366be3 100644 --- a/doc/reproducibility.rst +++ b/doc/reproducibility.rst @@ -81,7 +81,7 @@ The metrics used are: * Dynamic Time Warping (DTW), and * Dynamic Time Warping with a learned warping window (DTW(w)). -`Link to the notebook `__ +`Link to the notebook `__ +------------------+---------------+-----------+----------------+------------+-------------------+----------------+ | Name | ED (reported) | ED (pyts) | DTW (reported) | DTW (pyts) | DTW(w) (reported) | DTW(w) (pyts) | @@ -100,10 +100,32 @@ The metrics used are: +------------------+---------------+-----------+----------------+------------+-------------------+----------------+ +Bag-of-Patterns transformer followed by a 1NN classifier using Euclidean distance +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +`Link to the notebook `__ + ++------------------+----------------------------+------------------------+ +| Name | Bag-of-Patterns (reported) | Bag-of-Patterns (pyts) | ++==================+============================+========================+ +| Adiac | 0.5916 | 0.614 | ++------------------+----------------------------+------------------------+ +| ECG200 | 0.7857 | 0.786 | ++------------------+----------------------------+------------------------+ +| GunPoint | 0.9703 | 0.980 | ++------------------+----------------------------+------------------------+ +| MiddlePhalanxTW | 0.4914 | 0.474 | ++------------------+----------------------------+------------------------+ +| Plane | 0.9871 | 1.000 | ++------------------+----------------------------+------------------------+ +| SyntheticControl | 0.9258 | 0.926 | ++------------------+----------------------------+------------------------+ + + BOSS transformer followed by a 1NN classifier using the BOSS metric ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`Link to the notebook `__ +`Link to the notebook `__ +------------------+-----------------+-------------+ | Name | BOSS (reported) | BOSS (pyts) | @@ -125,7 +147,7 @@ BOSS transformer followed by a 1NN classifier using the BOSS metric BOSSVS classifier ^^^^^^^^^^^^^^^^^ -`Link to the notebook `__ +`Link to the notebook `__ +------------------+-------------------+---------------+ | Name | BOSSVS (reported) | BOSSVS (pyts) | @@ -144,31 +166,76 @@ BOSSVS classifier +------------------+-------------------+---------------+ -WEASEL transformer followed by a logistic regression -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Learning-Shapelet classifier +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`Link to the notebook `__ +`Link to the notebook `__ + ++------------------+------------------------------+--------------------------+ +| Name | LearningShapelet (reported) | LearningShapelet (pyts) | ++==================+==============================+==========================+ +| Adiac | 0.5274 | 0.527 | ++------------------+------------------------------+--------------------------+ +| ECG200 | 0.8714 | 0.860 | ++------------------+------------------------------+--------------------------+ +| GunPoint | 0.9826 | 0.987 | ++------------------+------------------------------+--------------------------+ +| MiddlePhalanxTW | 0.5403 | 0.552 | ++------------------+------------------------------+--------------------------+ +| Plane | 0.9948 | 0.990 | ++------------------+------------------------------+--------------------------+ +| SyntheticControl | 0.9946 | 0.990 | ++------------------+------------------------------+--------------------------+ + + +ROCKET transformer followed by a Ridge Classifier with built-in cross-validation +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +`Link to the notebook `__ + ++------------------+------------------------------+--------------------------+ +| Name | ROCKET (reported) | ROCKET (pyts) | ++==================+==============================+==========================+ +| Adiac | 0.7847 | 0.785 | ++------------------+------------------------------+--------------------------+ +| ECG200 | 0.9060 | 0.910 | ++------------------+------------------------------+--------------------------+ +| GunPoint | 1.0000 | 1.000 | ++------------------+------------------------------+--------------------------+ +| MiddlePhalanxTW | 0.5558 | 0.565 | ++------------------+------------------------------+--------------------------+ +| Plane | 1.0000 | 1.000 | ++------------------+------------------------------+--------------------------+ +| SyntheticControl | 0.8733 | 1.000 | ++------------------+------------------------------+--------------------------+ + + +SAXVSM classifier +^^^^^^^^^^^^^^^^^ + +`Link to the notebook `__ + ++------------------+------------------------------+--------------------------+ +| Name | SAXVSM (reported) | SAXVSM (pyts) | ++==================+==============================+==========================+ +| Adiac | 0.4574 | 0.458 | ++------------------+------------------------------+--------------------------+ +| ECG200 | 0.8354 | 0.840 | ++------------------+------------------------------+--------------------------+ +| GunPoint | 0.9930 | 0.993 | ++------------------+------------------------------+--------------------------+ +| MiddlePhalanxTW | 0.5393 | 0.545 | ++------------------+------------------------------+--------------------------+ +| Plane | 0.9799 | 0.981 | ++------------------+------------------------------+--------------------------+ +| SyntheticControl | 0.8691 | 0.869 | ++------------------+------------------------------+--------------------------+ -+------------------+-------------------+---------------+ -| Name | WEASEL (reported) | WEASEL (pyts) | -+==================+===================+===============+ -| Adiac | 0.8312 | 0.788 | -+------------------+-------------------+---------------+ -| ECG200 | 0.8500 | 0.850 | -+------------------+-------------------+---------------+ -| GunPoint | 1.0000 | 0.960 | -+------------------+-------------------+---------------+ -| MiddlePhalanxTW | 0.5390 | 0.539 | -+------------------+-------------------+---------------+ -| Plane | 1.0000 | 1.000 | -+------------------+-------------------+---------------+ -| SyntheticControl | 0.9933 | 0.973 | -+------------------+-------------------+---------------+ ShapeletTransform transformer followed by a Support Vector Machine with a linear kernel ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -`Link to the notebook `__ +`Link to the notebook `__ +------------------+------------------------------+--------------------------+ | Name | ShapeletTransform (reported) | ShapeletTransform (pyts) | @@ -185,3 +252,25 @@ ShapeletTransform transformer followed by a Support Vector Machine with a linear +------------------+------------------------------+--------------------------+ | SyntheticControl | 0.8733 | 0.873 | +------------------+------------------------------+--------------------------+ + + +WEASEL transformer followed by a logistic regression +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +`Link to the notebook `__ + ++------------------+-------------------+---------------+ +| Name | WEASEL (reported) | WEASEL (pyts) | ++==================+===================+===============+ +| Adiac | 0.8312 | 0.788 | ++------------------+-------------------+---------------+ +| ECG200 | 0.8500 | 0.850 | ++------------------+-------------------+---------------+ +| GunPoint | 1.0000 | 0.960 | ++------------------+-------------------+---------------+ +| MiddlePhalanxTW | 0.5390 | 0.539 | ++------------------+-------------------+---------------+ +| Plane | 1.0000 | 1.000 | ++------------------+-------------------+---------------+ +| SyntheticControl | 0.9933 | 0.973 | ++------------------+-------------------+---------------+ diff --git a/pyts/__init__.py b/pyts/__init__.py index 1c84b5d..8136e7a 100644 --- a/pyts/__init__.py +++ b/pyts/__init__.py @@ -7,7 +7,7 @@ several tools to perform these transformations. """ -__version__ = '0.11.dev0' +__version__ = '0.11.0' __all__ = ['approximation', 'bag_of_words', 'classification', 'datasets', 'decomposition', 'image', 'metrics', 'multivariate', diff --git a/pyts/bag_of_words/bow.py b/pyts/bag_of_words/bow.py index 3c8fd28..eaee905 100644 --- a/pyts/bag_of_words/bow.py +++ b/pyts/bag_of_words/bow.py @@ -243,7 +243,7 @@ def __init__(self, window_size=0.5, word_size=0.5, n_bins=4, warnings.warn("BagOfWords has been reworked in 0.11 in order to match " "its definition in the literature. To get the old " "BagOfWords, use pyts.bag_of_words.WordExtractor " - "instead.", UserWarning) + "instead.", FutureWarning) def fit(self, X, y=None): """Pass. diff --git a/setup.cfg b/setup.cfg index 61e3e3f..1a6f5f8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,7 @@ addopts = --doctest-modules filterwarnings = ignore:the matrix subclass:PendingDeprecationWarning ignore:Using or importing the ABCs from:DeprecationWarning - ignore:BagOfWords has been reworked in 0.11.*:UserWarning + ignore:BagOfWords has been reworked in 0.11.*:FutureWarning [flake8] # Default flake8 3.5 ignored flags