tslearn 0.6.2__tar.gz → 0.6.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. {tslearn-0.6.2 → tslearn-0.6.4}/PKG-INFO +36 -4
  2. tslearn-0.6.4/pyproject.toml +4 -0
  3. tslearn-0.6.4/setup.cfg +15 -0
  4. tslearn-0.6.4/setup.py +65 -0
  5. tslearn-0.6.4/tslearn/.cached_datasets/singleTrainTest.csv +86 -0
  6. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/__init__.py +1 -9
  7. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/backend/__init__.py +2 -1
  8. tslearn-0.6.4/tslearn/backend/backend.py +122 -0
  9. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/backend/numpy_backend.py +4 -0
  10. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/backend/pytorch_backend.py +4 -0
  11. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/bases/bases.py +13 -2
  12. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/clustering/kmeans.py +8 -3
  13. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/clustering/kshape.py +7 -4
  14. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/clustering/utils.py +13 -11
  15. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/datasets/ucr_uea.py +21 -11
  16. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/early_classification/early_classification.py +5 -4
  17. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/matrix_profile/matrix_profile.py +2 -2
  18. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/metrics/ctw.py +52 -30
  19. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/metrics/cycc.py +17 -12
  20. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/metrics/cysax.py +19 -12
  21. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/metrics/dtw_variants.py +794 -253
  22. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/metrics/sax.py +12 -8
  23. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/metrics/soft_dtw_fast.py +96 -44
  24. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/metrics/soft_dtw_loss_pytorch.py +7 -7
  25. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/metrics/softdtw_variants.py +387 -128
  26. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/metrics/utils.py +19 -10
  27. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/neighbors/neighbors.py +18 -3
  28. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/neural_network/neural_network.py +12 -1
  29. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/piecewise/piecewise.py +4 -4
  30. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/preprocessing/preprocessing.py +7 -5
  31. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/shapelets/shapelets.py +14 -7
  32. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/svm/svm.py +10 -10
  33. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/sklearn_patches.py +10 -8
  34. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/test_estimators.py +50 -13
  35. tslearn-0.6.4/tslearn/tests/test_metrics.py +808 -0
  36. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/test_shapelets.py +9 -0
  37. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/test_utils.py +13 -0
  38. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/utils/__init__.py +4 -2
  39. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/utils/cast.py +1 -2
  40. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/utils/utils.py +37 -8
  41. tslearn-0.6.4/tslearn.egg-info/PKG-INFO +190 -0
  42. tslearn-0.6.4/tslearn.egg-info/SOURCES.txt +82 -0
  43. tslearn-0.6.4/tslearn.egg-info/dependency_links.txt +1 -0
  44. tslearn-0.6.4/tslearn.egg-info/requires.txt +37 -0
  45. tslearn-0.6.4/tslearn.egg-info/top_level.txt +1 -0
  46. tslearn-0.6.2/pyproject.toml +0 -2
  47. tslearn-0.6.2/setup.cfg +0 -10
  48. tslearn-0.6.2/setup.py +0 -47
  49. tslearn-0.6.2/tslearn/backend/backend.py +0 -153
  50. tslearn-0.6.2/tslearn/metrics/cycc.c +0 -8892
  51. tslearn-0.6.2/tslearn/metrics/cysax.c +0 -9846
  52. tslearn-0.6.2/tslearn/metrics/soft_dtw_fast.c +0 -6987
  53. tslearn-0.6.2/tslearn/tests/test_metrics.py +0 -712
  54. {tslearn-0.6.2 → tslearn-0.6.4}/LICENSE +0 -0
  55. {tslearn-0.6.2 → tslearn-0.6.4}/MANIFEST.in +0 -0
  56. {tslearn-0.6.2 → tslearn-0.6.4}/README.md +0 -0
  57. {tslearn-0.6.2 → tslearn-0.6.4}/conftest.py +0 -0
  58. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/.cached_datasets/Trace.npz +0 -0
  59. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/barycenters/__init__.py +0 -0
  60. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/barycenters/dba.py +0 -0
  61. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/barycenters/euclidean.py +0 -0
  62. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/barycenters/softdtw.py +0 -0
  63. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/barycenters/utils.py +0 -0
  64. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/bases/__init__.py +0 -0
  65. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/clustering/__init__.py +0 -0
  66. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/datasets/__init__.py +0 -0
  67. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/datasets/cached.py +0 -0
  68. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/datasets/datasets.py +0 -0
  69. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/early_classification/__init__.py +0 -0
  70. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/generators/__init__.py +0 -0
  71. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/generators/generators.py +0 -0
  72. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/hdftools/__init__.py +0 -0
  73. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/hdftools/hdftools.py +0 -0
  74. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/matrix_profile/__init__.py +0 -0
  75. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/metrics/__init__.py +0 -0
  76. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/neighbors/__init__.py +0 -0
  77. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/neural_network/__init__.py +0 -0
  78. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/piecewise/__init__.py +0 -0
  79. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/preprocessing/__init__.py +0 -0
  80. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/shapelets/__init__.py +0 -0
  81. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/svm/__init__.py +0 -0
  82. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/__init__.py +0 -0
  83. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/test_barycenters.py +0 -0
  84. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/test_clustering.py +0 -0
  85. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/test_matrixprofile.py +0 -0
  86. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/test_neighbors.py +0 -0
  87. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/test_piecewise.py +0 -0
  88. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/test_preprocessing.py +0 -0
  89. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/test_serialize_models.py +0 -0
  90. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/test_svm.py +0 -0
  91. {tslearn-0.6.2 → tslearn-0.6.4}/tslearn/tests/test_variablelength.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: tslearn
3
- Version: 0.6.2
3
+ Version: 0.6.4
4
4
  Summary: A machine learning toolkit dedicated to time-series data
5
5
  Home-page: http://tslearn.readthedocs.io/
6
6
  Author: Romain Tavenard
@@ -9,9 +9,41 @@ License: BSD-2-Clause
9
9
  Project-URL: Source, https://github.com/tslearn-team/tslearn
10
10
  Classifier: License :: OSI Approved :: BSD License
11
11
  Description-Content-Type: text/markdown
12
- Provides-Extra: tests
13
- Provides-Extra: pytorch
14
12
  License-File: LICENSE
13
+ Requires-Dist: scikit-learn<1.7,>=1.3.2
14
+ Requires-Dist: numpy<2.3,>=1.24.3
15
+ Requires-Dist: scipy<1.17,>=1.10.1
16
+ Requires-Dist: numba<0.62,>=0.58.1
17
+ Requires-Dist: joblib<1.6,>=0.12
18
+ Provides-Extra: pytorch
19
+ Requires-Dist: torch; extra == "pytorch"
20
+ Provides-Extra: tests
21
+ Requires-Dist: pytest; extra == "tests"
22
+ Requires-Dist: torch; extra == "tests"
23
+ Requires-Dist: h5py; extra == "tests"
24
+ Requires-Dist: tensorflow==2.9.0; python_version == "3.8" and extra == "tests"
25
+ Requires-Dist: tensorflow>=2; (python_version != "3.8" and python_version < "3.13") and extra == "tests"
26
+ Requires-Dist: stumpy; extra == "tests"
27
+ Provides-Extra: all-features
28
+ Requires-Dist: torch; extra == "all-features"
29
+ Requires-Dist: h5py; extra == "all-features"
30
+ Requires-Dist: tensorflow==2.9.0; python_version == "3.8" and extra == "all-features"
31
+ Requires-Dist: tensorflow>=2; (python_version != "3.8" and python_version < "3.13") and extra == "all-features"
32
+ Requires-Dist: cesium>=0.12.2; (python_version >= "3.9" and "darwin" not in sys_platform) and extra == "all-features"
33
+ Requires-Dist: cesium; (python_version < "3.9" or "darwin" in sys_platform) and extra == "all-features"
34
+ Requires-Dist: pandas; extra == "all-features"
35
+ Dynamic: author
36
+ Dynamic: author-email
37
+ Dynamic: classifier
38
+ Dynamic: description
39
+ Dynamic: description-content-type
40
+ Dynamic: home-page
41
+ Dynamic: license
42
+ Dynamic: license-file
43
+ Dynamic: project-url
44
+ Dynamic: provides-extra
45
+ Dynamic: requires-dist
46
+ Dynamic: summary
15
47
 
16
48
  <!-- Our title -->
17
49
  <div align="center">
@@ -0,0 +1,4 @@
1
+ [build-system]
2
+ requires = ["setuptools"]
3
+ build-backend = "setuptools.build_meta"
4
+
@@ -0,0 +1,15 @@
1
+ [metadata]
2
+ description-file = README.md
3
+
4
+ [tool:pytest]
5
+ junit_family = xunit2
6
+ filterwarnings =
7
+ ignore::DeprecationWarning
8
+ ignore::PendingDeprecationWarning
9
+ ignore::sklearn.exceptions.SkipTestWarning
10
+ ignore::UserWarning
11
+
12
+ [egg_info]
13
+ tag_build =
14
+ tag_date = 0
15
+
tslearn-0.6.4/setup.py ADDED
@@ -0,0 +1,65 @@
1
+ from setuptools import setup, find_packages
2
+ from codecs import open
3
+ import os
4
+
5
+ ROOT = os.path.abspath(os.path.dirname(__file__))
6
+
7
+ def get_readme():
8
+ with open(os.path.join(ROOT, 'README.md'), encoding="utf-8") as f:
9
+ readme = f.read()
10
+ return readme
11
+
12
+ def get_version():
13
+ with open(os.path.join(ROOT, "tslearn/__init__.py")) as fd:
14
+ data = fd.readlines()
15
+ version_line = next(line for line in data if line.startswith("__version__"))
16
+
17
+ return version_line.strip().split("=")[1].strip('"\' ')
18
+
19
+
20
+ setup(
21
+ name="tslearn",
22
+ description="A machine learning toolkit dedicated to time-series data",
23
+ long_description=get_readme(),
24
+ long_description_content_type='text/markdown',
25
+ license='BSD-2-Clause',
26
+ classifiers=[
27
+ "License :: OSI Approved :: BSD License"
28
+ ],
29
+ packages=find_packages(),
30
+ package_data={"tslearn": [".cached_datasets/singleTrainTest.csv", ".cached_datasets/Trace.npz"]},
31
+ install_requires=[
32
+ "scikit-learn>=1.3.2,<1.7",
33
+ "numpy>=1.24.3,<2.3",
34
+ "scipy>=1.10.1,<1.17",
35
+ "numba>=0.58.1,<0.62",
36
+ "joblib>=0.12,<1.6"
37
+ ],
38
+ extras_require={
39
+ "pytorch": ['torch'],
40
+ "tests": [
41
+ "pytest",
42
+ "torch",
43
+ "h5py",
44
+ "tensorflow==2.9.0; python_version == '3.8'",
45
+ "tensorflow>=2; python_version != '3.8' and python_version < '3.13'",
46
+ "stumpy"
47
+ ],
48
+ "all_features": [
49
+ "torch",
50
+ "h5py",
51
+ "tensorflow==2.9.0; python_version == '3.8'",
52
+ "tensorflow>=2; python_version != '3.8' and python_version < '3.13'",
53
+ "cesium >= 0.12.2; python_version >= '3.9' and 'darwin' not in sys_platform",
54
+ "cesium; python_version < '3.9' or 'darwin' in sys_platform",
55
+ "pandas",
56
+ ]
57
+ },
58
+ version=get_version(),
59
+ url="http://tslearn.readthedocs.io/",
60
+ project_urls={
61
+ "Source": "https://github.com/tslearn-team/tslearn",
62
+ },
63
+ author="Romain Tavenard",
64
+ author_email="romain.tavenard@univ-rennes2.fr",
65
+ )
@@ -0,0 +1,86 @@
1
+ ;NB;C45;SVML;SVMQ;BN;RandF;RotF;MLP;Euclidean_1NN;DTW_R1_1NN;DTW_Rn_1NN;DDTW_R1_1NN;DDTW_Rn_1NN;ERP_1NN;LCSS_1NN;MSM_1NN;TWE_1NN;WDDTW_1NN;WDTW_1NN;DD_DTW;DTD_C;DTW_F;ST;LS;FS;BoP;SAXVSM;BOSS;TSF;TSBF;LPS;ACF;PS;EE;COTE;CID_DTW
2
+ Adiac;0.5626598465473146;0.5421994884910486;0.4424552429667519;0.7621483375959079;0.5012787723785166;0.6368286445012787;0.7749360613810742;0.7365728900255755;0.611253197;0.603580563;0.608695652;0.585677749;0.670076726;0.608695652;0.250639386;0.626598465;0.6342711;0.675191816;0.606138107;0.7007672634271099;0.700767263;0.611253197;0.782608695652174;0.5217391304347826;0.59335;0.5882352941176471;0.45268542199488493;0.7647058823529411;0.731457800511509;0.7698209718670077;0.7698209718670077;0.6649616368286445;0.7519181585677749;0.6649616368286445;0.79028133;0.6240409207161125
3
+ ArrowHead;0.5428571428571428;0.6057142857142858;0.7314285714285714;0.7428571428571429;0.5714285714285714;0.7142857142857143;0.7371428571428571;0.7085714285714285;0.8;0.702857143;0.8;0.777142857;0.834285714;0.8;0.788571429;0.805714286;0.794285714;0.805714286;0.817142857;0.7885714285714286;0.72;0.76;0.7371428571428571;0.8457142857142858;0.594286;0.7371428571428571;0.7885714285714286;0.8342857142857143;0.7257142857142858;0.7542857142857143;0.7828571428571428;0.6457142857142857;0.4742857142857143;0.8114285714285714;0.811428571;0.8285714285714286
4
+ Beef;0.6666666666666666;0.5333333333333333;0.9;0.9333333333333333;0.6;0.7333333333333333;0.8666666666666667;0.6;0.666666667;0.633333333;0.666666667;0.666666667;0.7;0.666666667;0.766666667;0.466666667;0.6;0.7;0.7;0.6666666666666666;0.666666667;0.666666667;0.9;0.8666666666666667;0.566667;0.6;0.43333333333333335;0.8;0.7666666666666667;0.5666666666666667;0.6;0.7333333333333333;0.7333333333333333;0.6333333333333333;0.866666667;0.6333333333333333
5
+ BeetleFly;0.75;0.9;0.8;0.85;0.85;0.8;0.9;0.8;0.75;0.7;0.65;0.75;0.85;0.75;0.8;0.6;0.7;0.75;0.7;0.65;0.65;0.6;0.9;0.8;0.7;0.7;0.9;0.9;0.75;0.8;0.8;0.65;0.85;0.75;0.8;0.75
6
+ BirdChicken;0.55;0.8;0.65;0.8;0.6;0.75;0.85;0.6;0.55;0.75;0.7;0.85;0.9;0.75;0.8;0.85;0.85;0.85;0.75;0.85;0.8;0.85;0.8;0.8;0.75;0.75;1.0;0.95;0.8;0.9;1.0;0.85;0.95;0.8;0.9;0.75
7
+ Car;0.6;0.5666666666666667;0.85;0.8833333333333333;0.5666666666666667;0.6666666666666666;0.8;0.7666666666666667;0.733333333;0.733333333;0.766666667;0.733333333;0.783333333;0.766666667;0.833333333;0.9;0.916666667;0.783333333;0.783333333;0.8;0.783333333;0.85;0.9166666666666666;0.7666666666666667;0.75;0.7833333333333333;0.8666666666666667;0.8333333333333334;0.7666666666666667;0.7833333333333333;0.85;0.5833333333333334;0.7;0.8333333333333334;0.9;0.7666666666666667
8
+ CBF;0.8955555555555555;0.6733333333333333;0.8777777777777778;0.8755555555555555;0.8544444444444445;0.89;0.9288888888888889;0.8944444444444445;0.852222222;0.996666667;0.994444444;0.592222222;0.572222222;0.997777778;0.99;0.968888889;0.991111111;0.591111111;0.996666667;0.9966666666666667;0.98;0.991111111;0.9744444444444444;0.9911111111111112;0.94;0.9244444444444444;0.9566666666666667;0.9977777777777778;0.9944444444444445;0.9877777777777778;0.9988888888888889;0.5988888888888889;0.5555555555555556;0.9977777777777778;0.995555556;0.9988888888888889
9
+ ChlorineConcentration;0.3463541666666667;0.6875;0.584375;0.92421875;0.5989583333333334;0.7125;0.8473958333333333;0.8614583333333333;0.65;0.6484375;0.65;0.683072917;0.69765625;0.659895833;0.719791667;0.627604167;0.6484375;0.68984375;0.64921875;0.7080729166666667;0.713020833;0.63359375;0.6997395833333333;0.5924479166666666;0.546354;0.640625;0.6544270833333333;0.6609375;0.7197916666666667;0.6924479166666667;0.6075520833333333;0.6619791666666667;0.7223958333333333;0.65625;0.727083333;0.6486979166666667
10
+ CinCECGTorso;0.8463768115942029;0.5898550724637681;0.4688405797101449;0.6514492753623189;0.8311594202898551;0.7384057971014493;0.8057971014492754;0.46159420289855074;0.897101449;0.650724638;0.930434783;0.710869565;0.939130435;0.887681159;0.946376812;0.961594203;0.846376812;0.910144928;0.85942029;0.7246376811594203;0.852173913;0.715217391;0.9543478260869566;0.8695652173913043;0.85942;0.7137681159420289;0.7702898550724637;0.8869565217391304;0.9826086956521739;0.7123188405797102;0.736231884057971;0.7978260869565217;0.8702898550724638;0.9420289855072463;0.994927536;0.9456521739130435
11
+ Coffee;0.9285714285714286;0.9285714285714286;1.0;1.0;0.9642857142857143;1.0;1.0;0.9642857142857143;1.0;1.0;1.0;0.928571429;0.964285714;1.0;1.0;0.892857143;1.0;0.964285714;1.0;1.0;1.0;0.964285714;0.9642857142857143;1.0;0.928571;0.9285714285714286;0.9285714285714286;1.0;0.9642857142857143;1.0;1.0;1.0;1.0;1.0;1.0;1.0
12
+ Computers;0.58;0.568;0.492;0.54;0.664;0.608;0.7;0.496;0.576;0.7;0.624;0.668;0.676;0.54;0.644;0.576;0.632;0.608;0.7;0.716;0.716;0.544;0.736;0.584;0.5;0.668;0.62;0.756;0.72;0.756;0.68;0.6;0.66;0.708;0.74;0.62
13
+ CricketX;0.37948717948717947;0.2743589743589744;0.38974358974358975;0.4846153846153846;0.3128205128205128;0.5871794871794872;0.6333333333333333;0.5051282051282051;0.576923077;0.753846154;0.779487179;0.630769231;0.630769231;0.764102564;0.730769231;0.764102564;0.748717949;0.641025641;0.78974359;0.7538461538461538;0.753846154;0.764102564;0.7717948717948718;0.7410256410256411;0.484615;0.5769230769230769;0.7384615384615385;0.735897435897436;0.6641025641025641;0.7051282051282052;0.6974358974358974;0.5666666666666667;0.5692307692307692;0.8128205128205128;0.807692308;0.7769230769230769
14
+ CricketY;0.39487179487179486;0.3282051282051282;0.45897435897435895;0.46153846153846156;0.28717948717948716;0.6102564102564103;0.6102564102564103;0.5256410256410257;0.566666667;0.743589744;0.756410256;0.558974359;0.561538462;0.730769231;0.787179487;0.771794872;0.753846154;0.582051282;0.758974359;0.7769230769230769;0.774358974;0.779487179;0.7794871794871795;0.717948717948718;0.530769;0.6333333333333333;0.6153846153846154;0.7538461538461538;0.6717948717948717;0.735897435897436;0.7666666666666667;0.5512820512820513;0.48717948717948717;0.8051282051282052;0.825641026;0.7128205128205128
15
+ CricketZ;0.39487179487179486;0.32051282051282054;0.37948717948717947;0.4641025641025641;0.3282051282051282;0.6076923076923076;0.6564102564102564;0.5435897435897435;0.587179487;0.753846154;0.735897436;0.556410256;0.605128205;0.733333333;0.741025641;0.764102564;0.735897436;0.617948718;0.761538462;0.7743589743589744;0.774358974;0.728205128;0.7871794871794872;0.7410256410256411;0.464103;0.5358974358974359;0.7076923076923077;0.7461538461538462;0.6717948717948717;0.7153846153846154;0.7538461538461538;0.6307692307692307;0.5743589743589743;0.782051282051282;0.815384615;0.7307692307692307
16
+ DiatomSizeReduction;0.8790849673202614;0.7156862745098039;0.954248366013072;0.9477124183006536;0.9411764705882353;0.8725490196078431;0.8725490196078431;0.9640522875816994;0.934640523;0.967320261;0.934640523;0.934640523;0.91503268;0.934640523;0.941176471;0.947712418;0.947712418;0.934640523;0.967320261;0.9673202614379085;0.91503268;0.934640523;0.9248366013071896;0.9803921568627451;0.866013;0.9215686274509803;0.8823529411764706;0.9313725490196079;0.9313725490196079;0.8986928104575164;0.9052287581699346;0.8888888888888888;0.8725490196078431;0.9444444444444444;0.928104575;0.934640522875817
17
+ DistalPhalanxOutlineCorrect;0.6739130434782609;0.7572463768115942;0.6630434782608695;0.7644927536231884;0.7282608695652174;0.782608695652174;0.7572463768115942;0.822463768115942;0.717391304;0.717391304;0.724637681;0.731884058;0.713768116;0.710144928;0.742753623;0.735507246;0.739130435;0.710144928;0.717391304;0.7318840579710145;0.724637681;0.768115942;0.7753623188405797;0.7789855072463768;0.75;0.7137681159420289;0.7282608695652174;0.7282608695652174;0.7717391304347826;0.782608695652174;0.7210144927536232;0.7608695652173914;0.7246376811594203;0.7282608695652174;0.760869565;0.7355072463768116
18
+ DistalPhalanxOutlineAgeGroup;0.7266187050359713;0.6906474820143885;0.7122302158273381;0.6690647482014388;0.7338129496402878;0.7697841726618705;0.7482014388489209;0.8057553956834532;0.625899281;0.769784173;0.625899281;0.676258993;0.690647482;0.676258993;0.73381295;0.741007194;0.712230216;0.64028777;0.697841727;0.7050359712230215;0.661870504;0.683453237;0.7697841726618705;0.7194244604316546;0.654676;0.6906474820143885;0.841726618705036;0.7482014388489209;0.7482014388489209;0.7122302158273381;0.6690647482014388;0.7122302158273381;0.7050359712230215;0.6906474820143885;0.748201439;0.6330935251798561
19
+ DistalPhalanxTW;0.6402877697841727;0.6258992805755396;0.7050359712230215;0.6258992805755396;0.6618705035971223;0.7050359712230215;0.7050359712230215;0.6258992805755396;0.633093525;0.589928058;0.633093525;0.589928058;0.589928058;0.669064748;0.633093525;0.64028777;0.633093525;0.589928058;0.604316547;0.6115107913669064;0.575539568;0.669064748;0.6618705035971223;0.6258992805755396;0.625899;0.697841726618705;0.60431654676259;0.6762589928057554;0.6690647482014388;0.6762589928057554;0.5683453237410072;0.6906474820143885;0.6762589928057554;0.6474820143884892;0.697841727;0.6258992805755396
20
+ Earthquakes;0.6690647482014388;0.697841726618705;0.6402877697841727;0.7410071942446043;0.5683453237410072;0.7482014388489209;0.7482014388489209;0.697841726618705;0.712230216;0.71942446;0.726618705;0.676258993;0.676258993;0.683453237;0.726618705;0.690647482;0.676258993;0.676258993;0.726618705;0.7050359712230215;0.705035971;0.748201439;0.7410071942446043;0.7410071942446043;0.705036;0.7410071942446043;0.7482014388489209;0.7482014388489209;0.7482014388489209;0.7482014388489209;0.6402877697841727;0.7482014388489209;0.7482014388489209;0.7410071942446043;0.748201439;0.7194244604316546
21
+ ECG200;0.77;0.8;0.81;0.85;0.75;0.79;0.85;0.79;0.88;0.77;0.88;0.83;0.89;0.88;0.89;0.91;0.89;0.88;0.88;0.83;0.84;0.81;0.83;0.88;0.81;0.83;0.85;0.87;0.87;0.84;0.86;0.82;0.86;0.88;0.88;0.89
22
+ ECG5000;0.8835555555555555;0.8986666666666666;0.9384444444444444;0.9262222222222222;0.8528888888888889;0.9346666666666666;0.9457777777777778;0.9328888888888889;0.924888889;0.924444444;0.925111111;0.919555556;0.920666667;0.932222222;0.929555556;0.931777778;0.927111111;0.922;0.924888889;0.9235555555555556;0.923555556;0.938222222;0.9437777777777778;0.9322222222222222;0.922667;0.9117777777777778;0.9104444444444444;0.9413333333333334;0.9388888888888889;0.9395555555555556;0.9171111111111111;0.9097777777777778;0.9355555555555556;0.9386666666666666;0.946;0.9266666666666666
23
+ ECGFiveDays;0.7967479674796748;0.7212543554006968;0.975609756097561;0.9721254355400697;0.7804878048780488;0.7212543554006968;0.908246225319396;0.9163763066202091;0.796747967;0.767711963;0.796747967;0.68641115;0.695702671;0.806039489;0.794425087;0.890824623;0.829268293;0.692218351;0.795586527;0.7688734030197445;0.822299652;0.974448316;0.983739837398374;1.0;0.997677;0.9872241579558653;0.9547038327526133;1.0;0.9558652729384437;0.8768873403019745;0.8792102206736353;0.9814169570267132;1.0;0.8199767711962834;0.99883856;0.7816492450638792
24
+ ElectricDevices;0.512644274413176;0.559330826092595;0.49824925431202177;0.5809881986772144;0.4625859162235767;0.6549085721696278;0.7857606017377772;0.6405135520684736;0.551679419;0.602126832;0.630787187;0.570872779;0.596809752;0.654000778;0.625988847;0.659058488;0.592659837;0.581895993;0.613409415;0.5918817274024122;0.593827;0.741149008;0.7469848268707042;0.587472442;0.579043;0.5960316431072494;0.7052263000907794;0.7992478277784982;0.6925171832447153;0.7025029179094799;0.681234599922189;0.625729477369991;0.5971988068992349;0.66294903384775;0.713266762;0.6156140578394501
25
+ FaceAll;0.6928994082840236;0.5491124260355029;0.7201183431952662;0.7331360946745562;0.6733727810650888;0.7325443786982249;0.9112426035502958;0.8627218934911243;0.713609467;0.807692308;0.807692308;0.872781065;0.881656805;0.792899408;0.800591716;0.809467456;0.786390533;0.89704142;0.79408284;0.901775147928994;0.898816568;0.75739645;0.778698224852071;0.7485207100591716;0.626036;0.755621301775148;0.9680473372781065;0.7816568047337278;0.7514792899408284;0.744378698224852;0.7674556213017751;0.7088757396449704;0.8201183431952662;0.8485207100591716;0.917751479;0.863905325443787
26
+ FaceFour;0.8409090909090909;0.7159090909090909;0.8863636363636364;0.8522727272727273;0.8977272727272727;0.8522727272727273;0.8181818181818182;0.9090909090909091;0.784090909;0.829545455;0.897727273;0.625;0.738636364;0.863636364;0.965909091;0.943181818;0.852272727;0.715909091;0.875;0.8295454545454546;0.818181818;0.988636364;0.8522727272727273;0.9659090909090909;0.909091;0.9545454545454546;0.9318181818181818;1.0;0.9318181818181818;1.0;0.9431818181818182;0.6590909090909091;0.5113636363636364;0.9090909090909091;0.897727273;0.875
27
+ FacesUCR;0.7273170731707317;0.4775609756097561;0.7580487804878049;0.7804878048780488;0.6117073170731707;0.7824390243902439;0.8029268292682927;0.7473170731707317;0.769268293;0.904878049;0.907804878;0.843414634;0.874634146;0.92097561;0.955121951;0.971219512;0.92;0.868292683;0.92;0.904390243902439;0.907804878;0.709756098;0.9058536585365854;0.9390243902439024;0.705854;0.8985365853658537;0.9253658536585366;0.9570731707317073;0.8834146341463415;0.8668292682926829;0.9258536585365854;0.6926829268292682;0.8004878048780488;0.9448780487804878;0.942439024;0.8946341463414634
28
+ 50words;0.5626373626373626;0.4175824175824176;0.6461538461538462;0.6901098901098901;0.16043956043956045;0.6813186813186813;0.6615384615384615;0.6505494505494506;0.630769231;0.69010989;0.764835165;0.692307692;0.762637363;0.712087912;0.797802198;0.813186813;0.793406593;0.769230769;0.771428571;0.7538461538461538;0.753846154;0.747252747;0.7054945054945055;0.7296703296703296;0.481319;0.5406593406593406;0.3934065934065934;0.7054945054945055;0.7406593406593407;0.7582417582417582;0.8175824175824176;0.42857142857142855;0.4175824175824176;0.8197802197802198;0.797802198;0.7802197802197802
29
+ FISH;0.6514285714285715;0.5657142857142857;0.8514285714285714;0.8628571428571429;0.6571428571428571;0.76;0.8285714285714286;0.8457142857142858;0.782857143;0.822857143;0.834285714;0.897142857;0.92;0.874285714;0.874285714;0.931428571;0.931428571;0.96;0.851428571;0.9428571428571428;0.925714286;0.948571429;0.9885714285714285;0.96;0.782857;0.8971428571428571;0.9485714285714286;0.9885714285714285;0.7942857142857143;0.8342857142857143;0.9428571428571428;0.6171428571428571;0.8114285714285714;0.9657142857142857;0.982857143;0.8342857142857143
30
+ FordA;0.49166666666666664;0.5621212121212121;0.4962121212121212;0.7772727272727272;0.5159090909090909;0.771969696969697;0.8446969696969697;0.7446969696969697;0.665151515;0.554545455;0.665151515;0.717424242;0.721969697;0.658333333;0.698484848;0.718939394;0.618181818;0.717424242;0.653030303;0.7227272727272728;0.765151515;0.892424242;0.9712121212121212;0.956818182;0.787121;0.7893939393939394;0.8272727272727273;0.9295454545454546;0.8151515151515152;0.85;0.8727272727272727;0.9363636363636364;0.9378787878787879;0.7378787878787879;0.956818182;0.771969696969697
31
+ FordB;0.5345679012345679;0.5259259259259259;0.5271604938271605;0.737037037037037;0.5074074074074074;0.654320987654321;0.7716049382716049;0.6654320987654321;0.60617284;0.619753086;0.598765432;0.665432099;0.656790123;0.624691358;0.648148148;0.641975309;0.608641975;0.659259259;0.598765432;0.6666666666666666;0.65308642;0.749382716;0.8074074074074075;0.917283951;0.728395;0.6246913580246913;0.7506172839506173;0.7111111111111111;0.6876543209876543;0.5987654320987654;0.7111111111111111;0.7802469135802469;0.7901234567901234;0.6617283950617284;0.803703704;0.6271604938271605
32
+ GunPoint;0.7866666666666666;0.7733333333333333;0.8;0.94;0.8533333333333334;0.94;0.92;0.9266666666666666;0.913333333;0.906666667;0.913333333;0.993333333;1.0;0.946666667;0.973333333;0.973333333;0.953333333;0.993333333;0.98;0.98;0.986666667;0.98;1.0;1.0;0.946667;0.9866666666666667;0.9866666666666667;1.0;0.9733333333333334;0.9866666666666667;0.9933333333333333;0.7266666666666667;0.8933333333333333;0.9933333333333333;1.0;0.9266666666666666
33
+ Ham;0.7523809523809524;0.5333333333333333;0.6;0.6571428571428571;0.7047619047619048;0.7142857142857143;0.7142857142857143;0.8380952380952381;0.6;0.466666667;0.6;0.476190476;0.542857143;0.6;0.60952381;0.514285714;0.514285714;0.552380952;0.580952381;0.47619047619047616;0.552380952;0.704761905;0.6857142857142857;0.6666666666666666;0.647619;0.5904761904761905;0.8095238095238095;0.6666666666666666;0.7428571428571429;0.7619047619047619;0.5619047619047619;0.6857142857142857;0.6;0.5714285714285714;0.647619048;0.5142857142857142
34
+ HandOutlines;0.8108108108108109;0.8810810810810811;0.8918918918918919;0.8675675675675676;0.845945945945946;0.9054054054054054;0.9108108108108108;0.8837837837837837;0.862162162;0.881081081;0.878378378;0.737837838;0.810810811;0.883783784;0.848648649;0.875675676;0.87027027;0.840540541;0.87027027;0.8675675675675676;0.864864865;0.916216216;0.9324324324324325;0.481081081;0.810811;0.9027027027027027;0.9081081081081082;0.9027027027027027;0.918918918918919;0.8540540540540541;0.8810810810810811;0.6864864864864865;0.745945945945946;0.8891891891891892;0.918918919;0.8621621621621621
35
+ Haptics;0.4383116883116883;0.35064935064935066;0.40584415584415584;0.42857142857142855;0.36363636363636365;0.45454545454545453;0.4383116883116883;0.4675324675324675;0.37012987;0.376623377;0.415584416;0.285714286;0.327922078;0.37012987;0.38961039;0.441558442;0.415584416;0.321428571;0.37012987;0.39935064935064934;0.399350649;0.435064935;0.5227272727272727;0.4675324675324675;0.392857;0.42207792207792205;0.37987012987012986;0.461038961038961;0.4448051948051948;0.4902597402597403;0.4318181818181818;0.4318181818181818;0.44805194805194803;0.39285714285714285;0.522727273;0.4253246753246753
36
+ Herring;0.578125;0.578125;0.609375;0.609375;0.53125;0.59375;0.65625;0.640625;0.515625;0.53125;0.53125;0.5;0.515625;0.625;0.5625;0.5625;0.515625;0.46875;0.53125;0.546875;0.546875;0.578125;0.671875;0.625;0.53125;0.5625;0.625;0.546875;0.609375;0.640625;0.578125;0.671875;0.5625;0.578125;0.625;0.515625
37
+ InlineSkate;0.21636363636363637;0.2690909090909091;0.3090909090909091;0.3290909090909091;0.17636363636363636;0.3509090909090909;0.3709090909090909;0.34;0.341818182;0.383636364;0.387272727;0.452727273;0.456363636;0.447272727;0.427272727;0.452727273;0.421818182;0.452727273;0.403636364;0.5618181818181818;0.509090909;0.372727273;0.37272727272727274;0.438181818;0.189091;0.37636363636363634;0.4109090909090909;0.5163636363636364;0.37636363636363634;0.38545454545454544;0.5;0.46;0.4290909090909091;0.46;0.494545455;0.41454545454545455
38
+ InsectWingbeatSound;0.6282828282828283;0.5070707070707071;0.6434343434343435;0.6005050505050505;0.6141414141414141;0.656060606060606;0.6363636363636364;0.5914141414141414;0.561616162;0.355050505;0.573737374;0.243434343;0.519191919;0.525757576;0.555555556;0.574747475;0.534343434;0.542424242;0.573737374;0.35505050505050506;0.472727273;0.630808081;0.6267676767676768;0.6060606060606061;0.489394;0.4919191919191919;0.5474747474747474;0.5232323232323233;0.6328282828282829;0.6247474747474747;0.5505050505050505;0.5580808080808081;0.5833333333333334;0.5949494949494949;0.652525253;0.5782828282828283
39
+ ItalyPowerDemand;0.9008746355685131;0.9465500485908649;0.9718172983479106;0.9514091350826045;0.9319727891156463;0.9659863945578231;0.9727891156462585;0.9455782312925171;0.955296404;0.950437318;0.955296404;0.91350826;0.972789116;0.955296404;0.957240039;0.943634597;0.948493683;0.940719145;0.950437318;0.9504373177842566;0.951409135;0.960155491;0.9475218658892128;0.9601554907677357;0.917396;0.8600583090379009;0.8163265306122449;0.9086491739552964;0.9601554907677357;0.8833819241982507;0.923226433430515;0.7900874635568513;0.8969873663751214;0.9620991253644315;0.961127308;0.956268221574344
40
+ LargeKitchenAppliances;0.45866666666666667;0.48533333333333334;0.4266666666666667;0.4613333333333333;0.5493333333333333;0.568;0.608;0.48;0.493333333;0.794666667;0.794666667;0.768;0.757333333;0.618666667;0.584;0.669333333;0.752;0.768;0.794666667;0.7946666666666666;0.794666667;0.8;0.8586666666666667;0.7013333333333334;0.56;0.624;0.8773333333333333;0.7653333333333333;0.5706666666666667;0.528;0.7173333333333334;0.7786666666666666;0.7333333333333333;0.8106666666666666;0.845333333;0.792
41
+ Lighting2;0.6721311475409836;0.6229508196721312;0.7213114754098361;0.7540983606557377;0.7377049180327869;0.7377049180327869;0.6885245901639344;0.7213114754098361;0.754098361;0.868852459;0.868852459;0.672131148;0.770491803;0.868852459;0.770491803;0.819672131;0.836065574;0.819672131;0.901639344;0.8688524590163934;0.868852459;0.786885246;0.7377049180327869;0.819672131147541;0.704918;0.7540983606557377;0.8524590163934426;0.8360655737704918;0.8032786885245902;0.7377049180327869;0.819672131147541;0.639344262295082;0.7377049180327869;0.8852459016393442;0.868852459;0.8688524590163934
42
+ Lighting7;0.6438356164383562;0.547945205479452;0.7123287671232876;0.7123287671232876;0.684931506849315;0.6986301369863014;0.726027397260274;0.6438356164383562;0.575342466;0.726027397;0.712328767;0.575342466;0.698630137;0.739726027;0.575342466;0.753424658;0.753424658;0.684931507;0.767123288;0.6712328767123288;0.657534247;0.575342466;0.726027397260274;0.7945205479452054;0.643836;0.5753424657534246;0.5753424657534246;0.684931506849315;0.7534246575342466;0.726027397260274;0.7397260273972602;0.5753424657534246;0.6027397260273972;0.7671232876712328;0.808219178;0.6986301369863014
43
+ MALLAT;0.8456289978678039;0.7513859275053305;0.8669509594882729;0.8635394456289979;0.9552238805970149;0.864818763326226;0.9492537313432836;0.8946695095948828;0.914285714;0.933901919;0.914285714;0.897228145;0.925373134;0.913859275;0.9108742;0.931769723;0.912153518;0.912579957;0.937739872;0.9488272921108742;0.927078891;0.948400853;0.9641791044776119;0.9501066098081024;0.976119;0.8456289978678039;0.8443496801705757;0.9381663113006397;0.9194029850746268;0.9603411513859275;0.908315565031983;0.8221748400852879;0.8840085287846482;0.9398720682302771;0.953944563;0.9253731343283582
44
+ Meat;0.9333333333333333;0.8666666666666667;0.9666666666666667;0.9666666666666667;0.9166666666666666;0.9333333333333333;0.9666666666666667;1.0;0.933333333;0.933333333;0.933333333;0.666666667;0.666666667;0.933333333;0.533333333;0.933333333;0.933333333;0.666666667;0.933333333;0.9333333333333333;0.933333333;0.9;0.85;0.7333333333333333;0.833333;0.7333333333333333;0.9;0.9;0.9333333333333333;0.9333333333333333;0.8833333333333333;0.85;0.8666666666666667;0.9333333333333333;0.916666667;0.9333333333333333
45
+ MedicalImages;0.4486842105263158;0.625;0.6157894736842106;0.7078947368421052;0.40131578947368424;0.7210526315789474;0.7723684210526316;0.7052631578947368;0.684210526;0.736842105;0.747368421;0.663157895;0.663157895;0.676315789;0.706578947;0.740789474;0.710526316;0.681578947;0.736842105;0.7368421052631579;0.744736842;0.723684211;0.6697368421052632;0.6644736842105263;0.623684;0.4934210526315789;0.5078947368421053;0.718421052631579;0.7552631578947369;0.7052631578947368;0.7460526315789474;0.6776315789473685;0.6618421052631579;0.7421052631578947;0.757894737;0.7421052631578947
46
+ MiddlePhalanxOutlineCorrect;0.5532646048109966;0.697594501718213;0.6357388316151202;0.7731958762886598;0.7044673539518901;0.8144329896907216;0.8006872852233677;0.8075601374570447;0.766323024;0.697594502;0.766323024;0.690721649;0.776632302;0.766323024;0.749140893;0.75257732;0.762886598;0.745704467;0.75257732;0.7319587628865979;0.742268041;0.786941581;0.7938144329896907;0.7800687285223368;0.728522;0.7079037800687286;0.6769759450171822;0.7800687285223368;0.8281786941580757;0.8144329896907216;0.7731958762886598;0.711340206185567;0.7903780068728522;0.7835051546391752;0.804123711;0.7628865979381443
47
+ MiddlePhalanxOutlineAgeGroup;0.5909090909090909;0.551948051948052;0.6168831168831169;0.487012987012987;0.6038961038961039;0.6038961038961039;0.5714285714285714;0.5584415584415584;0.519480519;0.5;0.519480519;0.558441558;0.577922078;0.480519481;0.61038961;0.493506494;0.519480519;0.538961039;0.519480519;0.538961038961039;0.5;0.512987013;0.6428571428571429;0.5714285714285714;0.545455;0.5194805194805194;0.5454545454545454;0.5454545454545454;0.577922077922078;0.577922077922078;0.487012987012987;0.6103896103896104;0.6168831168831169;0.5584415584415584;0.636363636;0.512987012987013
48
+ MiddlePhalanxTW;0.512987012987013;0.4935064935064935;0.577922077922078;0.5324675324675324;0.5064935064935064;0.5584415584415584;0.6298701298701299;0.5714285714285714;0.512987013;0.506493506;0.506493506;0.5;0.5;0.5;0.577922078;0.493506494;0.487012987;0.532467532;0.512987013;0.487012987012987;0.5;0.532467532;0.5194805194805194;0.5064935064935064;0.532468;0.5;0.487012987012987;0.5454545454545454;0.564935064935065;0.5974025974025974;0.525974025974026;0.5714285714285714;0.577922077922078;0.512987012987013;0.571428571;0.512987012987013
49
+ MoteStrain;0.8426517571884984;0.786741214057508;0.8666134185303515;0.8706070287539937;0.8562300319488818;0.8889776357827476;0.8801916932907349;0.8458466453674122;0.878594249;0.834664537;0.865814696;0.715654952;0.774760383;0.872204473;0.881789137;0.854632588;0.797124601;0.787539936;0.85942492;0.8330670926517572;0.767571885;0.908945687;0.896964856230032;0.8833865814696485;0.777157;0.8490415335463258;0.7939297124600639;0.8785942492012779;0.8690095846645367;0.9033546325878594;0.9217252396166135;0.7428115015974441;0.6884984025559105;0.8825878594249201;0.936900958;0.7955271565495208
50
+ NonInvasiveFatalECGThorax1;0.8111959287531807;0.7190839694656489;0.92264631043257;0.9404580152671755;0.811704834605598;0.878880407124682;0.9053435114503817;0.9256997455470738;0.829007634;0.790330789;0.829007634;0.697201018;0.72264631;0.824936387;0.81221374;0.816284987;0.820356234;0.729770992;0.815776081;0.8055979643765904;0.841221374;0.892111959;0.9496183206106871;0.259033079;0.710433;;0.5231552162849873;0.8381679389312977;0.8758269720101781;0.8422391857506362;0.8122137404580153;0.721119592875318;0.8753180661577609;0.8458015267175573;0.93129771;0.8371501272264631
51
+ NonInvasiveFatalECGThorax2;0.8274809160305343;0.7847328244274809;0.9419847328244275;0.9480916030534351;0.8391857506361323;0.9119592875318067;0.9246819338422392;0.9450381679389313;0.879898219;0.864631043;0.870229008;0.826463104;0.825954198;0.895165394;0.88346056;0.882951654;0.888040712;0.860559796;0.884478372;0.8931297709923665;0.88956743;0.899236641;0.9511450381679389;0.770483461;0.75369;;0.5913486005089058;0.9007633587786259;0.9099236641221374;0.8615776081424936;0.8412213740458016;0.7516539440203562;0.8839694656488549;0.9134860050890585;0.945547074;0.8793893129770992
52
+ OliveOil;0.9;0.8333333333333334;0.8666666666666667;0.8666666666666667;0.9;0.9;0.8666666666666667;0.9;0.866666667;0.833333333;0.866666667;0.866666667;0.833333333;0.866666667;0.4;0.833333333;0.866666667;0.866666667;0.833333333;0.8333333333333334;0.866666667;0.9;0.9;0.16666666666666666;0.733333;0.8666666666666667;0.9;0.8666666666666667;0.8666666666666667;0.8333333333333334;0.8666666666666667;0.8;0.8333333333333334;0.8666666666666667;0.9;0.8666666666666667
53
+ OSULeaf;0.38016528925619836;0.34297520661157027;0.44214876033057854;0.5661157024793388;0.30991735537190085;0.512396694214876;0.5702479338842975;0.45867768595041325;0.520661157;0.590909091;0.599173554;0.880165289;0.871900826;0.603305785;0.789256198;0.772727273;0.776859504;0.884297521;0.623966942;0.8801652892561983;0.884297521;0.809917355;0.9669421487603306;0.7768595041322314;0.677686;0.6487603305785123;0.8512396694214877;0.9545454545454546;0.5826446280991735;0.7603305785123967;0.7396694214876033;0.7768595041322314;0.8223140495867769;0.8057851239669421;0.966942149;0.6198347107438017
54
+ PhalangesOutlinesCorrect;0.6538461538461539;0.7342657342657343;0.6468531468531469;0.7249417249417249;0.7307692307692307;0.817016317016317;0.8601398601398601;0.8368298368298368;0.761072261;0.728438228;0.761072261;0.74009324;0.791375291;0.75990676;0.742424242;0.751748252;0.75990676;0.776223776;0.747086247;0.7389277389277389;0.761072261;0.771561772;0.7634032634032634;0.7645687645687645;0.74359;0.7097902097902098;0.7097902097902098;0.7715617715617715;0.803030303030303;0.8298368298368298;0.7564102564102564;0.7354312354312355;0.747086247086247;0.7727272727272727;0.77039627;0.7622377622377622
55
+ Phoneme;0.13660337552742616;0.06540084388185655;0.0938818565400844;0.0970464135021097;0.11286919831223628;0.14662447257383968;0.12974683544303797;0.0970464135021097;0.109177215;0.228375527;0.226793249;0.256329114;0.246835443;0.179324895;0.256329114;0.292194093;0.270042194;0.244725738;0.161392405;0.2689873417721519;0.267932489;0.276898734;0.3206751054852321;0.21835443;0.173523;0.12974683544303797;0.10495780590717299;0.26476793248945146;0.2120253164556962;0.27637130801687765;0.23681434599156118;0.23048523206751054;0.2199367088607595;0.3048523206751055;0.349156118;0.2209915611814346
56
+ Plane;0.9428571428571428;0.9619047619047619;0.9809523809523809;0.9904761904761905;0.9809523809523809;0.9904761904761905;0.9904761904761905;0.9619047619047619;0.961904762;1.0;1.0;1.0;1.0;1.0;1.0;1.0;1.0;1.0;1.0;1.0;1.0;0.99047619;1.0;1.0;1.0;0.9809523809523809;0.9904761904761905;1.0;1.0;1.0;1.0;0.9714285714285714;1.0;1.0;1.0;1.0
57
+ ProximalPhalanxOutlineCorrect;0.6460481099656358;0.7972508591065293;0.8247422680412371;0.9003436426116839;0.7216494845360825;0.865979381443299;0.8625429553264605;0.865979381443299;0.807560137;0.783505155;0.790378007;0.817869416;0.852233677;0.810996564;0.756013746;0.786941581;0.807560137;0.841924399;0.783505155;0.7938144329896907;0.793814433;0.828178694;0.8831615120274914;0.8487972508591065;0.804124;0.7457044673539519;0.8281786941580757;0.8487972508591065;0.8281786941580757;0.872852233676976;0.8419243986254296;0.8178694158075601;0.8694158075601375;0.8075601374570447;0.869415808;0.7903780068728522
58
+ ProximalPhalanxOutlineAgeGroup;0.824390243902439;0.8341463414634146;0.8536585365853658;0.8097560975609757;0.8536585365853658;0.8682926829268293;0.8536585365853658;0.8;0.785365854;0.804878049;0.785365854;0.819512195;0.809756098;0.795121951;0.853658537;0.790243902;0.804878049;0.819512195;0.804878049;0.8;0.795121951;0.819512195;0.8439024390243902;0.8341463414634146;0.780488;0.7658536585365854;0.824390243902439;0.8341463414634146;0.848780487804878;0.848780487804878;0.7951219512195122;0.8390243902439024;0.8341463414634146;0.8048780487804879;0.853658537;0.7902439024390244
59
+ ProximalPhalanxTW;0.7365853658536585;0.7365853658536585;0.824390243902439;0.7609756097560976;0.7463414634146341;0.8097560975609757;0.824390243902439;0.7902439024390244;0.707317073;0.76097561;0.76097561;0.751219512;0.736585366;0.702439024;0.804878049;0.756097561;0.746341463;0.746341463;0.751219512;0.7658536585365854;0.770731707;0.814634146;0.8048780487804879;0.775609756097561;0.702439;0.6585365853658537;0.6097560975609756;0.8;0.8146341463414634;0.8097560975609757;0.7317073170731707;0.751219512195122;0.7902439024390244;0.7658536585365854;0.780487805;0.751219512195122
60
+ RefrigerationDevices;0.384;0.464;0.352;0.37333333333333335;0.504;0.5146666666666667;0.5653333333333334;0.368;0.394666667;0.464;0.44;0.408;0.424;0.490666667;0.490666667;0.482666667;0.512;0.434666667;0.426666667;0.44533333333333336;0.445333333;0.482666667;0.5813333333333334;0.5146666666666667;0.333333;0.4613333333333333;0.6533333333333333;0.49866666666666665;0.5893333333333334;0.472;0.45866666666666667;0.496;0.5066666666666667;0.43733333333333335;0.546666667;0.44533333333333336
61
+ ScreenType;0.43466666666666665;0.37333333333333335;0.38133333333333336;0.384;0.448;0.43466666666666665;0.44;0.38666666666666666;0.36;0.397333333;0.410666667;0.426666667;0.442666667;0.381333333;0.437333333;0.458666667;0.426666667;0.426666667;0.410666667;0.42933333333333334;0.437333333;0.434666667;0.52;0.42933333333333334;0.413333;0.4186666666666667;0.512;0.464;0.456;0.5093333333333333;0.416;0.504;0.49333333333333335;0.44533333333333336;0.546666667;0.4053333333333333
62
+ ShapeletSim;0.4666666666666667;0.4888888888888889;0.4888888888888889;0.48333333333333334;0.5222222222222223;0.4888888888888889;0.4111111111111111;0.4722222222222222;0.538888889;0.65;0.694444444;0.538888889;0.505555556;0.838888889;0.822222222;0.866666667;0.577777778;0.494444444;0.755555556;0.6111111111111112;0.6;0.672222222;0.9555555555555556;0.95;1.0;0.7;0.7166666666666667;1.0;0.4777777777777778;0.9611111111111111;0.8666666666666667;0.9222222222222223;0.7666666666666667;0.8166666666666667;0.961111111;0.7444444444444445
63
+ ShapesAll;0.6233333333333333;0.4716666666666667;0.7133333333333334;0.7483333333333333;0.5833333333333334;0.77;0.7433333333333333;0.65;0.751666667;0.768333333;0.801666667;0.835;0.845;0.811666667;0.845;0.871666667;0.86;0.86;0.811666667;0.85;0.838333333;0.805;0.8416666666666667;0.768333333;0.58;0.785;0.6983333333333334;0.9083333333333333;0.7916666666666666;0.185;0.8733333333333333;0.6166666666666667;0.7383333333333333;0.8666666666666667;0.891666667;0.8083333333333333
64
+ SmallKitchenAppliances;0.5146666666666667;0.5733333333333334;0.4613333333333333;0.4613333333333333;0.6533333333333333;0.6693333333333333;0.728;0.3333333333333333;0.344;0.642666667;0.672;0.653333333;0.669333333;0.632;0.472;0.698666667;0.645333333;0.645333333;0.674666667;0.64;0.648;0.757333333;0.792;0.664;0.333333;0.7466666666666667;0.5786666666666667;0.7253333333333334;0.8106666666666666;0.672;0.712;0.6986666666666667;0.68;0.696;0.776;0.6746666666666666
65
+ SonyAIBORobotSurface;0.930116472545757;0.6555740432612313;0.7038269550748752;0.7071547420965059;0.740432612312812;0.6372712146422629;0.8086522462562395;0.9018302828618968;0.695507488;0.725457571;0.695507488;0.730449251;0.698835275;0.688851913;0.735440932;0.730449251;0.680532446;0.717138103;0.737104825;0.7420965058236273;0.710482529;0.740432612;0.8435940099833611;0.8103161397670549;0.685524;0.7154742096505824;0.8136439267886856;0.632279534109817;0.7870216306156406;0.7953410981697171;0.7737104825291181;0.8868552412645591;0.8785357737104825;0.7038269550748752;0.845257903;0.8153078202995009
66
+ SonyAIBORobotSurfaceII;0.7869884575026233;0.6862539349422875;0.8184679958027282;0.8184679958027282;0.7901364113326338;0.7901364113326338;0.8079748163693599;0.8405036726128017;0.859391396;0.831059811;0.859391396;0.858342078;0.861490031;0.822665268;0.81112277;0.870933893;0.853095488;0.858342078;0.831059811;0.8919202518363064;0.891920252;0.856243442;0.9338929695697796;0.8751311647429171;0.790136;0.8111227701993704;0.8163693599160545;0.8593913955928646;0.8100734522560336;0.7775445960125918;0.8719832109129066;0.9244491080797481;0.9045120671563484;0.8782791185729276;0.951731375;0.8772298006295908
67
+ StarLightCurves;0.791403593977659;0.9072365225837785;0.9194997571636717;0.9339485186983972;0.791403593977659;0.9498542982030111;0.9692812044681884;0.8464060223409422;0.848834386;0.906629432;0.898251578;0.962238951;0.963695969;0.86243322;0.879431763;0.868139874;0.883195726;0.962238951;0.895216124;0.9622389509470617;0.962238951;0.96163186;0.9785089849441476;0.946576008;0.9178;;0.8753035454103933;0.9777804759592035;0.9694026226323458;0.9770519669742593;0.9629674599320058;0.9643030597377368;0.9537396794560467;0.926056338028169;0.979601748;0.9181034482758621
68
+ Strawberry;0.7648648648648648;0.9378378378378378;0.918918918918919;0.972972972972973;0.8189189189189189;0.9567567567567568;0.972972972972973;0.9621621621621622;0.945945946;0.940540541;0.945945946;0.962162162;0.962162162;0.945945946;0.837837838;0.943243243;0.943243243;0.962162162;0.943243243;0.9540540540540541;0.956756757;0.97027027;0.9621621621621622;0.9108108108108108;0.902703;0.9675675675675676;0.9567567567567568;0.9756756756756757;0.9648648648648649;0.9540540540540541;0.9621621621621622;0.8702702702702703;0.9405405405405406;0.9459459459459459;0.951351351;0.9432432432432433
69
+ SwedishLeaf;0.8576;0.6576;0.8416;0.864;0.8336;0.8704;0.8816;0.8288;0.7888;0.792;0.8464;0.8848;0.904;0.8624;0.888;0.896;0.8912;0.8928;0.8736;0.9008;0.896;0.9008;0.928;0.9072;0.768;0.7344;0.6688;0.9216;0.9136;0.9152;0.92;0.8816;0.9024;0.9152;0.9552;0.8816
70
+ Symbols;0.7979899497487437;0.6271356783919598;0.8703517587939699;0.8944723618090452;0.8954773869346734;0.9015075376884422;0.792964824120603;0.75678391959799;0.899497487;0.949748744;0.937688442;0.970854271;0.968844221;0.920603015;0.954773869;0.948743719;0.959798995;0.973869347;0.949748744;0.9527638190954774;0.96281407;0.948743719;0.8824120603015075;0.9316582914572864;0.933668;0.9507537688442211;0.6221105527638191;0.9668341708542714;0.914572864321608;0.9457286432160804;0.9628140703517588;0.8974874371859296;0.7989949748743719;0.9597989949748744;0.963819095;0.9407035175879397
71
+ syntheticcontrol;0.96;0.81;0.9233333333333333;0.9433333333333334;0.9266666666666666;0.9433333333333334;0.9733333333333334;0.91;0.88;0.993333333;0.983333333;0.566666667;0.566666667;0.976666667;0.953333333;0.973333333;0.986666667;0.566666667;0.993333333;0.9933333333333333;0.996666667;0.99;0.9833333333333333;0.9966666666666667;0.91;0.9333333333333333;0.89;0.9666666666666667;0.9866666666666667;0.9933333333333333;0.98;0.66;0.6533333333333333;0.99;1.0;0.9733333333333334
72
+ ToeSegmentation1;0.5526315789473685;0.5921052631578947;0.543859649122807;0.5745614035087719;0.5789473684210527;0.6491228070175439;0.5307017543859649;0.5;0.679824561;0.771929825;0.75;0.785087719;0.587719298;0.833333333;0.75;0.815789474;0.820175439;0.627192982;0.793859649;0.8070175438596491;0.807017544;0.921052632;0.9649122807017544;0.9342105263157895;0.95614;0.8771929824561403;0.9298245614035088;0.9385964912280702;0.7412280701754386;0.7807017543859649;0.8771929824561403;0.8903508771929824;0.6973684210526315;0.8289473684210527;0.973684211;0.7368421052631579
73
+ ToeSegmentation2;0.6384615384615384;0.5;0.5461538461538461;0.6538461538461539;0.5615384615384615;0.7692307692307693;0.5846153846153846;0.5923076923076923;0.807692308;0.838461538;0.907692308;0.684615385;0.784615385;0.923076923;0.907692308;0.753846154;0.784615385;0.792307692;0.892307692;0.7461538461538462;0.715384615;0.907692308;0.9076923076923077;0.9153846153846154;0.692308;0.9461538461538461;0.8615384615384616;0.9615384615384616;0.8153846153846154;0.8;0.8692307692307693;0.8307692307692308;0.7461538461538462;0.8923076923076924;0.915384615;0.8769230769230769
74
+ Trace;0.8;0.79;0.73;0.82;0.82;0.78;0.93;0.84;0.76;1.0;0.99;1.0;0.99;0.95;0.97;0.93;0.99;1.0;1.0;1.0;0.99;1.0;1.0;1.0;1.0;0.97;1.0;1.0;0.99;0.98;0.98;1.0;0.95;0.99;1.0;0.99
75
+ TwoLeadECG;0.6988586479367866;0.7181738366988587;0.9411764705882353;0.9051799824407375;0.733099209833187;0.7243195785776997;0.9701492537313433;0.9508340649692713;0.74714662;0.905179982;0.868305531;0.994732221;0.981562774;0.942054434;0.885864794;0.947322212;0.973661106;0.994732221;0.905179982;0.9780509218612818;0.985074627;0.985074627;0.9973661106233538;0.9964881474978051;0.924495;0.9754170324846356;0.897278314310799;0.9806848112379281;0.7585601404741001;0.8656716417910447;0.9482001755926251;0.8042142230026339;0.9604916593503073;0.971027216856892;0.992976295;0.8814749780509219
76
+ TwoPatterns;0.457;0.65125;0.82175;0.87425;0.46275;0.858;0.928;0.91075;0.90675;1.0;0.9985;0.9975;0.99675;1.0;0.99925;0.999;0.9985;0.9975;1.0;1.0;0.9995;1.0;0.955;0.99325;0.90825;0.942;0.8745;0.993;0.99125;0.97625;0.982;0.414;0.46575;1.0;1.0;0.99825
77
+ uWaveGestureLibraryX;0.6652707984366276;0.6013400335008375;0.65857063093244;0.7185929648241206;0.6694584031267449;0.7621440536013401;0.7828029034059185;0.7479061976549414;0.739251815;0.727526521;0.774427694;0.676996092;0.741485204;0.771356784;0.771356784;0.769123395;0.771356784;0.74427694;0.774427694;0.7791736460078169;0.774706868;0.801507538;0.8029034059184813;0.791178112786153;0.694584;0.5977107761027359;0.5290340591848129;0.7621440536013401;0.8040201005025126;0.830820770519263;0.8291457286432161;0.47292015633724177;0.4480737018425461;0.8054159687325516;0.821887214;0.7897822445561139
78
+ uWaveGestureLibraryY;0.5558347292015634;0.5630932439977666;0.6275823562255723;0.6261864879955332;0.5845896147403685;0.6937465103294249;0.7144053601340034;0.6641541038525963;0.661641541;0.63400335;0.701842546;0.584031267;0.662758236;0.678950307;0.691792295;0.701842546;0.684812954;0.659128978;0.693188163;0.7158012283640425;0.698492462;0.702959241;0.7303182579564489;0.7029592406476829;0.595757;0.5318257956448911;0.41178112786152987;0.6850921273031826;0.7272473478503629;0.7361809045226131;0.760748185371301;0.4818537130094919;0.44667783361250696;0.725572305974316;0.758514796;0.72250139586823
79
+ uWaveGestureLibraryZ;0.5633724176437744;0.5734226689000559;0.6144611948632049;0.6549413735343383;0.5734226689000559;0.7199888330541597;0.7227805695142379;0.6756002233389168;0.649637074;0.658291457;0.675041876;0.577051926;0.676996092;0.686767169;0.688721385;0.699888331;0.683696259;0.678950307;0.675879397;0.6962590731434952;0.679229481;0.7319933;0.748464544946957;0.7467895030709101;0.638191;0.5561139028475712;0.4916247906197655;0.6948632049134562;0.7428810720268006;0.7724734785036292;0.768285873813512;0.4768285873813512;0.46621998883305416;0.7236180904522613;0.75041876;0.7063093243997767
80
+ UWaveGestureLibraryAll;0.8905639307649358;0.7841987716359575;0.8939140145170296;0.9357900614182021;0.8905639307649358;0.9385817978782803;0.9444444444444444;0.9316024567280848;0.948073702;0.891680625;0.962311558;0.849246231;0.927135678;0.953657175;0.958961474;0.963149079;0.952819654;0.93718593;0.966219989;0.9352317141261864;0.937744277;0.965661642;0.9422110552763819;0.953378001;0.788666;;0.7989949748743719;0.9388609715242882;0.957286432160804;0.9262981574539364;0.9659408151870463;0.5321049692908989;0.6602456728084869;0.9684533780011167;0.964265773;0.963428252372976
81
+ wafer;0.7084685269305646;0.9819922128487995;0.9599286177806619;0.9941596365996106;0.9576573653471772;0.9935107073329007;0.9944841012329656;0.963984425697599;0.995457495;0.979883193;0.995944192;0.977774173;0.997079818;0.99513303;0.989779364;0.997404283;0.995619727;0.997404283;0.997079818;0.9798831927319922;0.992537313;0.996593121;1.0;0.9961064243997404;0.996755;0.995619727449708;0.999026606;0.9948085658663206;0.9961064243997404;0.9951330304996755;0.9974042829331603;0.995944192083063;0.9951330304996755;0.9974042829331603;0.999837768;0.9943218689162882
82
+ Wine;0.5740740740740741;0.6851851851851852;0.8333333333333334;0.7592592592592593;0.6111111111111112;0.7407407407407407;0.9444444444444444;0.9444444444444444;0.611111111;0.574074074;0.611111111;0.518518519;0.537037037;0.611111111;0.481481481;0.592592593;0.574074074;0.518518519;0.574074074;0.5740740740740741;0.611111111;0.703703704;0.7962962962962963;0.5;0.759259;0.7592592592592593;0.9629629629629629;0.7407407407407407;0.6296296296296297;0.6111111111111112;0.6296296296296297;0.7037037037037037;0.48148148148148145;0.5740740740740741;0.648148148;0.6111111111111112
83
+ WordSynonyms;0.47648902821316613;0.38087774294670845;0.512539184952978;0.5658307210031348;0.2507836990595611;0.5705329153605015;0.5987460815047022;0.5376175548589341;0.617554859;0.648902821;0.749216301;0.680250784;0.731974922;0.681818182;0.757053292;0.763322884;0.749216301;0.731974922;0.744514107;0.7304075235109718;0.730407524;0.673981191;0.5705329153605015;0.6065830721003135;0.431034;0.5156739811912225;0.49059561128526646;0.6379310344827587;0.6473354231974922;0.6880877742946708;0.7554858934169278;0.3652037617554859;0.37460815047021945;0.7789968652037618;0.757053292;0.7570532915360502
84
+ Worms;0.38961038961038963;0.4025974025974026;0.38961038961038963;0.42857142857142855;0.44155844155844154;0.5454545454545454;0.6103896103896104;0.4155844155844156;0.454545455;0.584415584;0.532467532;0.584415584;0.649350649;0.558441558;0.597402597;0.571428571;0.571428571;0.584415584;0.532467532;0.5844155844155844;0.649350649;0.532467532;0.7402597402597403;0.6103896103896104;0.649351;0.5324675324675324;0.5584415584415584;0.5584415584415584;0.6103896103896104;0.6883116883116883;0.7012987012987013;0.7532467532467533;0.6883116883116883;0.6623376623376623;0.623376623;0.6103896103896104
85
+ WormsTwoClass;0.5194805194805194;0.5584415584415584;0.4935064935064935;0.5714285714285714;0.5714285714285714;0.6363636363636364;0.6883116883116883;0.5974025974025974;0.61038961;0.623376623;0.584415584;0.636363636;0.688311688;0.649350649;0.649350649;0.675324675;0.61038961;0.636363636;0.571428571;0.6493506493506493;0.623376623;0.701298701;0.8311688311688312;0.7272727272727273;0.727273;0.6363636363636364;0.7142857142857143;0.8311688311688312;0.6233766233766234;0.7532467532467533;0.7532467532467533;0.7662337662337663;0.8181818181818182;0.6883116883116883;0.805194805;0.6753246753246753
86
+ yoga;0.5423333333333333;0.6843333333333333;0.572;0.786;0.606;0.8146666666666667;0.8243333333333334;0.8206666666666667;0.830333333;0.836666667;0.843;0.82;0.828666667;0.847;0.860333333;0.865333333;0.872;0.84;0.853;0.856;0.856;0.868333333;0.8176666666666667;0.8343333333333334;0.695;0.832;0.84;0.9183333333333333;0.8593333333333333;0.8193333333333334;0.869;0.75;0.6953333333333334;0.879;0.876666667;0.844
@@ -1,7 +1,5 @@
1
- import os
2
-
3
1
  __author__ = 'Romain Tavenard romain.tavenard[at]univ-rennes2.fr'
4
- __version__ = "0.6.2"
2
+ __version__ = "0.6.4"
5
3
  __bibtex__ = r"""@article{JMLR:v21:20-091,
6
4
  author = {Romain Tavenard and Johann Faouzi and Gilles Vandewiele and
7
5
  Felix Divo and Guillaume Androz and Chester Holtz and
@@ -15,9 +13,3 @@ __bibtex__ = r"""@article{JMLR:v21:20-091,
15
13
  pages = {1-6},
16
14
  url = {http://jmlr.org/papers/v21/20-091.html}
17
15
  }"""
18
-
19
-
20
- on_rtd = os.environ.get('READTHEDOCS') == 'True'
21
- if on_rtd:
22
- import pyximport
23
- pyximport.install()
@@ -3,10 +3,11 @@ The :mod:`tslearn.backend` module provides multiple backends.
3
3
  The backends provided are NumPy and PyTorch.
4
4
  """
5
5
 
6
- from .backend import Backend, instantiate_backend, select_backend
6
+ from .backend import Backend, cast, instantiate_backend, select_backend
7
7
 
8
8
  __all__ = [
9
9
  "Backend",
10
+ "cast",
10
11
  "instantiate_backend",
11
12
  "select_backend",
12
13
  ]
@@ -0,0 +1,122 @@
1
+ """The generic backend."""
2
+
3
+ from tslearn.backend.numpy_backend import NumPyBackend
4
+
5
+ try:
6
+ import torch
7
+
8
+ from tslearn.backend.pytorch_backend import PyTorchBackend
9
+ except ImportError:
10
+
11
+ class PyTorchBackend:
12
+ def __init__(self):
13
+ raise ValueError(
14
+ "Could not use pytorch backend since torch is not installed"
15
+ )
16
+
17
+
18
+ def instantiate_backend(*args):
19
+ """Select backend.
20
+
21
+ Parameter
22
+ ---------
23
+ *args : Input arguments can be Backend instance or string or array or None
24
+ Arguments used to define the backend instance.
25
+
26
+ Returns
27
+ -------
28
+ backend : Backend instance
29
+ The backend instance.
30
+ """
31
+ for arg in args:
32
+ if isinstance(arg, Backend):
33
+ return arg
34
+ arg_string = (str(type(arg)) + str(arg)).lower()
35
+ if "numpy" in arg_string:
36
+ return Backend("numpy")
37
+ if "torch" in arg_string:
38
+ return Backend("pytorch")
39
+ return Backend("numpy")
40
+
41
+
42
+ def select_backend(data):
43
+ """Select backend.
44
+
45
+ Parameter
46
+ ---------
47
+ data : array-like or string or None
48
+ Indicates the backend to choose.
49
+ Optional, default equals None.
50
+
51
+ Returns
52
+ -------
53
+ backend : class
54
+ The backend class.
55
+ If data is a Numpy array or data equals 'numpy' or data is None,
56
+ backend equals NumpyBackend().
57
+ If data is a PyTorch array or data equals 'pytorch',
58
+ backend equals PytorchBackend().
59
+ """
60
+ arg_string = (str(type(data)) + str(data)).lower()
61
+ if "torch" in arg_string:
62
+ return PyTorchBackend()
63
+ return NumPyBackend()
64
+
65
+
66
+ class Backend(object):
67
+ """Class for the backend.
68
+
69
+ Parameter
70
+ ---------
71
+ data : array-like or string or None
72
+ Indicates the backend to choose.
73
+ If data is a Numpy array or data equals 'numpy' or data is None,
74
+ self.backend is set to NumpyBackend().
75
+ If data is a PyTorch array or data equals 'pytorch',
76
+ self.backend is set to PytorchBackend().
77
+ Optional, default equals None.
78
+ """
79
+
80
+ def __init__(self, data=None):
81
+ self.backend = select_backend(data)
82
+
83
+ for element in dir(self.backend):
84
+ if "__" not in element:
85
+ setattr(self, element, getattr(self.backend, element))
86
+
87
+ self.is_numpy = self.backend_string == "numpy"
88
+ self.is_pytorch = self.backend_string == "pytorch"
89
+
90
+ def get_backend(self):
91
+ return self.backend
92
+
93
+ def set_backend(self, data=None):
94
+ self.backend = select_backend(data)
95
+
96
+
97
+ def cast(data, array_type="numpy"):
98
+ """Cast data to list or specific backend.
99
+
100
+ Parameters
101
+ ----------
102
+ data: array-like,
103
+ The input data should be a list or numpy array or torch array.
104
+ The data to cast.
105
+ array_type: string
106
+ The type to cast the data. It can be "numpy", "pytorch" or "list".
107
+
108
+ Returns
109
+ --------
110
+ data_cast: array-like
111
+ Data cast to array_type.
112
+ """
113
+ data_type_string = str(type(data)).lower()
114
+ array_type = array_type.lower()
115
+ if array_type == "pytorch":
116
+ array_type = "torch"
117
+ if array_type in data_type_string:
118
+ return data
119
+ if array_type == "list":
120
+ return data.tolist()
121
+ be = Backend(array_type)
122
+ return be.array(data)
@@ -81,6 +81,10 @@ class NumPyBackend(object):
81
81
  self.zeros = _np.zeros
82
82
  self.zeros_like = _np.zeros_like
83
83
 
84
+ @staticmethod
85
+ def belongs_to_backend(x):
86
+ return "numpy" in str(type(x)).lower()
87
+
84
88
  @staticmethod
85
89
  def cast(x, dtype):
86
90
  return x.astype(dtype)
@@ -121,6 +121,10 @@ else:
121
121
 
122
122
  return _torch.tensor(val, dtype=dtype)
123
123
 
124
+ @staticmethod
125
+ def belongs_to_backend(x):
126
+ return "torch" in str(type(x)).lower()
127
+
124
128
  def cast(self, x, dtype):
125
129
  if _torch.is_tensor(x):
126
130
  return x.to(dtype=dtype)
@@ -24,6 +24,16 @@ _DEFAULT_TAGS = {
24
24
 
25
25
 
26
26
  class TimeSeriesBaseEstimator(BaseEstimator):
27
+
28
+ def _get_tags(self):
29
+ # sklearn < 1.6 super()._get_tags() returns dict based on _more_tags
30
+ # sklearn >= 1.6 super()._get_tags() returns dict based on __sklearn_tags__
31
+ tags = super()._get_tags()
32
+
33
+ # Make sure update tags based on _more_tags for sklearn > 1.6
34
+ tags.update(self._more_tags())
35
+ return tags
36
+
27
37
  def _more_tags(self):
28
38
  return _DEFAULT_TAGS
29
39
 
@@ -204,8 +214,9 @@ class BaseModelPackage:
204
214
  model = cls._byte2string(model)
205
215
 
206
216
  for k in model['hyper_params'].keys():
207
- if model['hyper_params'][k] == 'None':
208
- model['hyper_params'][k] = None
217
+ if isinstance(model['hyper_params'][k], str):
218
+ if model['hyper_params'][k] == 'None':
219
+ model['hyper_params'][k] = None
209
220
 
210
221
  return cls._organize_model(cls, model)
211
222
 
@@ -33,7 +33,6 @@ except:
33
33
  return _k_init(*args, **kwargs), None
34
34
 
35
35
 
36
- from sklearn.utils import check_array
37
36
  from sklearn.utils.validation import check_is_fitted
38
37
 
39
38
  from tslearn.barycenters import (
@@ -43,7 +42,7 @@ from tslearn.barycenters import (
43
42
  )
44
43
  from tslearn.bases import BaseModelPackage, TimeSeriesBaseEstimator
45
44
  from tslearn.metrics import cdist_dtw, cdist_gak, cdist_soft_dtw, sigma_gak
46
- from tslearn.utils import check_dims, to_sklearn_dataset, to_time_series_dataset
45
+ from tslearn.utils import check_array, check_dims, to_sklearn_dataset, to_time_series_dataset
47
46
 
48
47
  from .utils import (
49
48
  EmptyClusterError,
@@ -458,7 +457,13 @@ class KernelKMeans(ClusterMixin, BaseModelPackage, TimeSeriesBaseEstimator):
458
457
  return dist.argmin(axis=1)
459
458
 
460
459
  def _more_tags(self):
461
- return {"allow_nan": True, "allow_variable_length": True}
460
+ sample_weight_failure_msg = "Currently not supported due to clusters initialization"
461
+ return {"allow_nan": True,
462
+ "allow_variable_length": True,
463
+ "_xfail_checks": {
464
+ "check_sample_weight_equivalence_on_dense_data": sample_weight_failure_msg,
465
+ "check_sample_weight_equivalence_on_sparse_data": sample_weight_failure_msg
466
+ }}
462
467
 
463
468
 
464
469
  class TimeSeriesKMeans(
@@ -3,11 +3,9 @@ from sklearn.base import ClusterMixin
3
3
  from sklearn.utils import check_random_state
4
4
  import numpy
5
5
 
6
-
7
- from sklearn.utils import check_array
8
6
  from sklearn.utils.validation import check_is_fitted
9
7
  from tslearn.preprocessing import TimeSeriesScalerMeanVariance
10
- from tslearn.utils import to_time_series_dataset, check_dims
8
+ from tslearn.utils import to_time_series_dataset, check_dims, check_array
11
9
  from tslearn.metrics import cdist_normalized_cc, y_shifted_sbd_vec
12
10
  from tslearn.bases import BaseModelPackage, TimeSeriesBaseEstimator
13
11
 
@@ -289,4 +287,9 @@ class KShape(ClusterMixin, TimeSeriesCentroidBasedClusteringMixin,
289
287
  X_ = TimeSeriesScalerMeanVariance(mu=0., std=1.).fit_transform(X_)
290
288
  dists = self._cross_dists(X_)
291
289
  return dists.argmin(axis=1)
292
-
290
+
291
+ def __sklearn_tags__(self):
292
+ tags = super().__sklearn_tags__()
293
+ tags.input_tags.allow_nan = True
294
+ tags.input_tags.sparse = False
295
+ return tags
@@ -52,7 +52,7 @@ def _compute_inertia(distances, assignments, squared=True):
52
52
  --------
53
53
  >>> dists = numpy.array([[1., 2., 0.5], [0., 3., 1.]])
54
54
  >>> assign = numpy.array([2, 0])
55
- >>> _compute_inertia(dists, assign)
55
+ >>> float(_compute_inertia(dists, assign))
56
56
  0.125
57
57
  """
58
58
  n_ts = distances.shape[0]
@@ -141,24 +141,27 @@ def silhouette_score(X, labels, metric=None, sample_size=None,
141
141
  --------
142
142
  >>> from tslearn.generators import random_walks
143
143
  >>> from tslearn.metrics import cdist_dtw
144
+ >>> from tslearn.metrics import dtw
144
145
  >>> numpy.random.seed(0)
145
146
  >>> X = random_walks(n_ts=20, sz=16, d=1)
146
147
  >>> labels = numpy.random.randint(2, size=20)
147
- >>> silhouette_score(X, labels, metric="dtw") # doctest: +ELLIPSIS
148
+ >>> float(silhouette_score(X, labels, metric="dtw")) # doctest: +ELLIPSIS
148
149
  0.13383800...
149
- >>> silhouette_score(X, labels, metric="euclidean") # doctest: +ELLIPSIS
150
+ >>> float(silhouette_score(X, labels, metric="euclidean")) # doctest: +ELLIPSIS
150
151
  0.09126917...
151
- >>> silhouette_score(X, labels, metric="softdtw") # doctest: +ELLIPSIS
152
+ >>> float(silhouette_score(X, labels, metric="softdtw")) # doctest: +ELLIPSIS
152
153
  0.17953934...
153
- >>> silhouette_score(X, labels, metric="softdtw",
154
- ... metric_params={"gamma": 2.}) \
154
+ >>> float(silhouette_score(X, labels, metric="softdtw",
155
+ ... metric_params={"gamma": 2.})) \
155
156
  # doctest: +ELLIPSIS
156
157
  0.17591060...
157
- >>> silhouette_score(cdist_dtw(X), labels,
158
- ... metric="precomputed") # doctest: +ELLIPSIS
158
+ >>> float(silhouette_score(cdist_dtw(X), labels,
159
+ ... metric="precomputed")) # doctest: +ELLIPSIS
160
+ 0.13383800...
161
+ >>> float(silhouette_score(X, labels, metric=dtw)) # doctest: +ELLIPSIS
159
162
  0.13383800...
160
163
  """
161
- sklearn_metric = None
164
+ sklearn_metric = "precomputed"
162
165
  if metric_params is None:
163
166
  metric_params_ = {}
164
167
  else:
@@ -188,10 +191,9 @@ def silhouette_score(X, labels, metric=None, sample_size=None,
188
191
  remove_nans=True),
189
192
  to_time_series(y.reshape((sz, d)),
190
193
  remove_nans=True))
191
- metric = "precomputed" if sklearn_metric is None else sklearn_metric
192
194
  return sklearn_silhouette(X=sklearn_X,
193
195
  labels=labels,
194
- metric=metric,
196
+ metric=sklearn_metric,
195
197
  sample_size=sample_size,
196
198
  random_state=random_state,
197
199
  **kwds)