{ "info": { "author": "Toon Van Craenendonck", "author_email": "toon.vancraenendonck@cs.kuleuven.be", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Software Development :: Build Tools" ], "description": "=================================\nSemi-supervised clustering with COBRAS\n=================================\n\nLibrary for semi-supervised clustering using pairwise constraints.\n\nCOBRAS supports three modes for constraint elicitation:\n\n1. With *labeled data*. in this case the pairwise relations are derived from the labels.\n This is mainly used to compare COBRAS experimentally to competitors.\n\n2. With *interaction through the commandline*.\n In this case the user is queried about the pairwise relations, and can answer with yes (y) and no (n)\n through the commandline. The indices that are shown in the queries are the row indices in the specified\n data matrix (starting from zero).\n\n3. With *interaction through a visual user interface*.\n If you use COBRAS-TS, the instantiation of COBRAS that is tailored to time series clustering, you can use an\n interactive web application that visualizes the data, queries, and intermediate clustering results. A demo can be\n found at https://dtai.cs.kuleuven.be/software/cobras/\n\n.. class:: no-web\n\n .. image:: ../../raw/master/images/cobras_ts_demo_resized.png\n :alt: COBRAS^TS for interactive time series clustering\n :width: 5%\n :align: center\n\n\n-----------------\nInstallation\n-----------------\n\nThis package is available on PyPi::\n\n $ pip install cobras_ts\n\nThe following dependencies are automatically installed: dtaidistance, kshape, numpy, scikit-learn.\n\nIn case you want to use the interactive GUI, install ``cobras_ts`` using the following command to\nautomatically install additional dependencies (bokeh, datashader, and cloudpickle)::\n\n $ pip install --find-links https://dtai.cs.kuleuven.be/software/cobras/datashader.html pip cobras_ts[gui]\n\n\n-----------------\nUsage\n-----------------\n\nCOBRAS from the command line\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe COBRAS algorithm can easily be run from the command line.\nA ``cobras_ts`` script will be installed by pip::\n\n $ cobras_ts --format=csv --labelcol=0 /path/to/UCR_TS_Archive_2015/ECG200/ECG200_TEST\n\nThis script is also available in the repository as ``cobras_ts_cli.py``.\n\n\nCOBRAS as a Python package\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nExamples can also be found in the examples subdirectory.\n\n\nRunning COBRAS_kmeans:\n\n .. code-block:: python\n\n import numpy as np\n from sklearn import metrics\n\n from cobras_ts.cobras_kmeans import COBRAS_kmeans\n from cobras_ts.labelquerier import LabelQuerier\n\n budget = 100\n\n data = np.loadtxt('/home/toon/data/iris.data', delimiter=',')\n X = data[:,1:]\n labels = data[:,0]\n\n clusterer = COBRAS_kmeans(X, LabelQuerier(labels), budget)\n clusterings, runtimes, ml, cl = clusterer.cluster()\n\n final_clustering = clusterings[-1].construct_cluster_labeling()\n print(metrics.adjusted_rand_score(final_clustering,labels))\n\n\nRunning COBRAS_kShape:\n\n .. code-block:: python\n\n import os\n\n import numpy as np\n from sklearn import metrics\n\n from cobras_ts.cobras_kshape import COBRAS_kShape\n from cobras_ts.labelquerier import LabelQuerier\n\n ucr_path = '/home/toon/Downloads/UCR_TS_Archive_2015'\n dataset = 'ECG200'\n budget = 100\n\n data = np.loadtxt(os.path.join(ucr_path,dataset,dataset + '_TEST'), delimiter=',')\n series = data[:,1:]\n labels = data[:,0]\n\n clusterer = COBRAS_kShape(series, LabelQuerier(labels), budget)\n clusterings, runtimes, ml, cl = clusterer.cluster()\n\n final_clustering = clusterings[-1].construct_cluster_labeling()\n print(metrics.adjusted_rand_score(final_clustering,labels))\n\nRunning COBRAS_DTW:\n\nThis uses the dtaidistance package to compute the DTW distance matrix.\nNote that constructing this matrix is typically the most time consuming step, and significant speedups can be achieved\nby using the C implementation in the dtaidistance package.\n\n .. code-block:: python\n\n import os\n\n import numpy as np\n from dtaidistance import dtw\n from sklearn import metrics\n\n from cobras_ts.cobras_dtw import COBRAS_DTW\n from cobras_ts.labelquerier import LabelQuerier\n\n ucr_path = '/home/toon/Downloads/UCR_TS_Archive_2015'\n dataset = 'ECG200'\n budget = 100\n alpha = 0.5\n window = 10\n\n data = np.loadtxt(os.path.join(ucr_path,dataset,dataset + '_TEST'), delimiter=',')\n series = data[:,1:]\n labels = data[:,0]\n\n\n dists = dtw.distance_matrix(series, window=int(0.01 * window * series.shape[1]))\n dists[dists == np.inf] = 0\n dists = dists + dists.T - np.diag(np.diag(dists))\n affinities = np.exp(-dists * alpha)\n\n clusterer = COBRAS_DTW(affinities, LabelQuerier(labels), budget)\n clusterings, runtimes, ml, cl = clusterer.cluster()\n\n final_clustering = clusterings[-1].construct_cluster_labeling()\n print(metrics.adjusted_rand_score(final_clustering,labels))\n\n\n-----------------\nDependencies\n-----------------\n\nThis package uses Python3, numpy, scikit-learn, kshape and dtaidistance.\n\n-----------------\nContact\n-----------------\nToon Van Craenendonck at toon.vancraenendonck@cs.kuleuven.be\n\n-----------------\nLicense\n-----------------\n\n COBRAS code for semi-supervised time series clustering.\n\n Copyright 2018 KU Leuven, DTAI Research Group\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/toon_vc/cobras_ts/", "keywords": "clustering timeseries semi-supervised pairwise constraints", "license": "", "maintainer": "", "maintainer_email": "", "name": "cobras-ts", "package_url": "https://pypi.org/project/cobras-ts/", "platform": "", "project_url": "https://pypi.org/project/cobras-ts/", "project_urls": { "Homepage": "https://bitbucket.org/toon_vc/cobras_ts/" }, "release_url": "https://pypi.org/project/cobras-ts/0.1.0/", "requires_dist": [ "dtaidistance", "kshape", "numpy", "scikit-learn[alldeps]", "check-manifest; extra == 'dev'", "sphinx-rtd-theme; extra == 'dev'", "bokeh; extra == 'gui'", "cloudpickle; extra == 'gui'", "datashader; extra == 'gui'", "coverage; extra == 'test'" ], "requires_python": ">=3.5", "summary": "Semi-supervised time series clustering with COBRAS", "version": "0.1.0" }, "last_serial": 3871416, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "ee42f738c1e62a90755918ab1134314d", "sha256": "96b173a65ce7344917b03b8e6fed691735e9ec9184dedc0ebf6731565975b8e8" }, "downloads": -1, "filename": "cobras_ts-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ee42f738c1e62a90755918ab1134314d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9547, "upload_time": "2018-03-26T08:31:53", "url": "https://files.pythonhosted.org/packages/0b/b1/bb9e9a2eecc7c797b915b8fef2fc2bf5942312d91b5fd8ab7ffff6a00fb9/cobras_ts-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "99e37e3db313efd6e99433c34a019b91", "sha256": "a8986fe29661007a4df9b47ce4d93121bb5d616dfbf1dd6831297592ec07f2c6" }, "downloads": -1, "filename": "cobras_ts-0.0.1.tar.gz", "has_sig": false, "md5_digest": "99e37e3db313efd6e99433c34a019b91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7904, "upload_time": "2018-03-26T08:31:54", "url": "https://files.pythonhosted.org/packages/32/8f/b048a33bfc0f854c7c8971d89650f9ea88d7e430f4ae93d50c951ff31af1/cobras_ts-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c96b547f2bd22a5587a0755415a7289c", "sha256": "8bf122d7b3a412f50f02f7a0ba43d99b96724abb6905009291f9c770a6e98f70" }, "downloads": -1, "filename": "cobras_ts-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c96b547f2bd22a5587a0755415a7289c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9577, "upload_time": "2018-03-26T11:50:05", "url": "https://files.pythonhosted.org/packages/93/c8/12f504e4b59a2dfa045d7e0787bb1f486acd52dadb5593a0b19679e6e6ad/cobras_ts-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1d7f1b51ab64c81c2c2633b81b389d08", "sha256": "f401f86a5aa65394743de5e45488e3a95d1c5f38095bd67efb94952d1ef7e1c3" }, "downloads": -1, "filename": "cobras_ts-0.0.2.tar.gz", "has_sig": false, "md5_digest": "1d7f1b51ab64c81c2c2633b81b389d08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7912, "upload_time": "2018-03-26T11:50:06", "url": "https://files.pythonhosted.org/packages/f2/24/fcdc8b0ad155b822a5bd675cadd06794b47622e75140e2688e224470cdda/cobras_ts-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "d4ba579906cc59c354068a392ec4df30", "sha256": "7b8bb808316e35ce27ba087e0ede1af6e55a473f5062a2597a9fea0fce5282dc" }, "downloads": -1, "filename": "cobras_ts-0.0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d4ba579906cc59c354068a392ec4df30", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11726, "upload_time": "2018-03-26T13:24:11", "url": "https://files.pythonhosted.org/packages/ad/0e/7202edfd32a1b64c8995882e9e9cb5d6a7371d428e63a3808315f628c354/cobras_ts-0.0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1ead4f6bc43882caade2f0004dd71661", "sha256": "239533ffe3646d9b9c15d9e51b97e5b4c1bff395f05669a1a0084311a3e8d7f9" }, "downloads": -1, "filename": "cobras_ts-0.0.3.tar.gz", "has_sig": false, "md5_digest": "1ead4f6bc43882caade2f0004dd71661", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10174, "upload_time": "2018-03-26T13:24:12", "url": "https://files.pythonhosted.org/packages/db/51/d3d6394523b5768a3a6461f376d97b61013ba7321f71e82362d105074333/cobras_ts-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "7724d85933f5f39820e0f44792f937e8", "sha256": "8b318882edd278d80e86e67164fa620dc0b52b3e0707680c0ff1e50e614fe4c4" }, "downloads": -1, "filename": "cobras_ts-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7724d85933f5f39820e0f44792f937e8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21899, "upload_time": "2018-05-04T08:02:51", "url": "https://files.pythonhosted.org/packages/51/0c/6e60686a104509cfa086e8c6af31bddaa7d187747758ab8a04ec5c2e2fae/cobras_ts-0.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eff9aaa1de387cb93d5602f409c324cf", "sha256": "7807b3ee6703fd8b33ed6ac53e7213ddaa7c317e1c06fa7fa757f93222976029" }, "downloads": -1, "filename": "cobras_ts-0.0.4.tar.gz", "has_sig": false, "md5_digest": "eff9aaa1de387cb93d5602f409c324cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 79759, "upload_time": "2018-05-04T08:02:53", "url": "https://files.pythonhosted.org/packages/a6/e2/a882a555aab5dd552d32419bbcfc37d44aabea447578328191d57b8c9d8b/cobras_ts-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "74046fd91a64eaa891b60534047545d8", "sha256": "f6872e2319ae016003051303026d56ecb5346f9fe6d58cb93493df3a82f61fb1" }, "downloads": -1, "filename": "cobras_ts-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "74046fd91a64eaa891b60534047545d8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 21899, "upload_time": "2018-05-04T08:27:28", "url": "https://files.pythonhosted.org/packages/ea/cc/36306e0428b1fea0172b8da5e192fcb037b0c9a96c537f5c2efd63e1212b/cobras_ts-0.0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "184f6436e4361854dac2618d3600e92f", "sha256": "55a78eccf4688ba981b9ac7e1c282ffe3349d38028692c4078ed8f246d146295" }, "downloads": -1, "filename": "cobras_ts-0.0.5.tar.gz", "has_sig": false, "md5_digest": "184f6436e4361854dac2618d3600e92f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17710, "upload_time": "2018-05-04T08:27:31", "url": "https://files.pythonhosted.org/packages/7b/7d/7f5b825bb3075b2f9ddbf75baa023eacc203ca59a81a00a467313159496c/cobras_ts-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "036b4a23ab077073c61c6019f09657b4", "sha256": "8dd633ba07ff70e770232c39612160bbc6c1159208c68c8635ec2fc919bf60af" }, "downloads": -1, "filename": "cobras_ts-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "036b4a23ab077073c61c6019f09657b4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22634, "upload_time": "2018-05-04T08:46:06", "url": "https://files.pythonhosted.org/packages/59/27/64908f5388a1795b7bc3493b5da07fdddd00b8e1b4226fce7d2e217970da/cobras_ts-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "97e4aaf633a9b3caa2aa72132e879ffe", "sha256": "d4e904ad7f69268cefe55d3d58b554a37680c345b35092fd6d9aa33653bb7a7e" }, "downloads": -1, "filename": "cobras_ts-0.0.6.tar.gz", "has_sig": false, "md5_digest": "97e4aaf633a9b3caa2aa72132e879ffe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18121, "upload_time": "2018-05-04T08:46:07", "url": "https://files.pythonhosted.org/packages/e4/52/fa7926c6d918f03fb8b873806bf0266fcd2f3ad4ebc4b97bb46fa1adf13e/cobras_ts-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "7a0863e5af65a9ab7bcf8f53652b2c67", "sha256": "8c9f18d0e1a6ae4c5061251d4629d23b8a16c27cd05f375fdbf525a938ea9986" }, "downloads": -1, "filename": "cobras_ts-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "7a0863e5af65a9ab7bcf8f53652b2c67", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23229, "upload_time": "2018-05-04T09:00:49", "url": "https://files.pythonhosted.org/packages/d9/36/9141b02aed912a18c9268deca5a7780dcdef90a5325743edbe0be038cb66/cobras_ts-0.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "44aa86d439649e2946a48af736e362a3", "sha256": "64ddd3e8986510b42d729e79b22ee8e46e51dbf769741f5cca9630b46a297586" }, "downloads": -1, "filename": "cobras_ts-0.0.7.tar.gz", "has_sig": false, "md5_digest": "44aa86d439649e2946a48af736e362a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18525, "upload_time": "2018-05-04T09:00:52", "url": "https://files.pythonhosted.org/packages/db/d7/4cc057897e9d7049954ae83029524e3539ceac9af438fe1309bdea0e5f3a/cobras_ts-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "a08f51f8212eee62f8f5e79e93bd1ae7", "sha256": "0dd326456870b81ebe289950fb6626ce1e5a2ff9c6d0aa606b3f117fc139eb9e" }, "downloads": -1, "filename": "cobras_ts-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "a08f51f8212eee62f8f5e79e93bd1ae7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23350, "upload_time": "2018-05-04T11:09:05", "url": "https://files.pythonhosted.org/packages/52/cd/896a428df6026ab2362846266e3dc723021001532afcefbaebbcee53e21e/cobras_ts-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "959f3f1474b22f8b3741a6609735c4c0", "sha256": "e5597c4b46c02f5a0ee40a8a8fac6c2d3a78bbb2787eedf2eba29ecf2176ca94" }, "downloads": -1, "filename": "cobras_ts-0.0.8.tar.gz", "has_sig": false, "md5_digest": "959f3f1474b22f8b3741a6609735c4c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18613, "upload_time": "2018-05-04T11:09:06", "url": "https://files.pythonhosted.org/packages/56/61/f406b52aa832c5ee5b04e0696801cbeea867d3fae270aca3c2565e972966/cobras_ts-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "f1b3868b0ad0d7f3b2f4210ba3ab0963", "sha256": "8af20cbbe225bfb342c8d7022da017f88b73be2bd3f1a737b2aa91fa94571cc4" }, "downloads": -1, "filename": "cobras_ts-0.0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "f1b3868b0ad0d7f3b2f4210ba3ab0963", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23516, "upload_time": "2018-05-09T14:33:23", "url": "https://files.pythonhosted.org/packages/65/4c/b72f009893fad20fde06fb168aeadb8079db37a175530b08b07f73064fd0/cobras_ts-0.0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c4745504f781389beb0f1da51d887849", "sha256": "b9575972b5245c263c7f3bfbbb77b92e1716288690c2548e6765471c810494b2" }, "downloads": -1, "filename": "cobras_ts-0.0.9.tar.gz", "has_sig": false, "md5_digest": "c4745504f781389beb0f1da51d887849", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18876, "upload_time": "2018-05-09T14:33:25", "url": "https://files.pythonhosted.org/packages/0e/25/dc32c95d9e9dd603ca8ce991dbacecd76de27376369fd8aadeda90060351/cobras_ts-0.0.9.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "bf18a9121b9b9c04a2381fb4683db81e", "sha256": "f0fcafa9a92bbaca1962bb0a69d19287db87be1ec8666b155effba4c4490c81a" }, "downloads": -1, "filename": "cobras_ts-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "bf18a9121b9b9c04a2381fb4683db81e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 23277, "upload_time": "2018-05-17T08:26:04", "url": "https://files.pythonhosted.org/packages/b9/1d/17c224b02399e1df4dcea4d16dd1e23f407933fec16ddff860bb61f2b16c/cobras_ts-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "97c84f3ff0e2663fc615c86a96ad7208", "sha256": "7c3dcf0ed4afac847bd63bb71fd15546c896516c4b4226f03ae240dda7bbeb8d" }, "downloads": -1, "filename": "cobras_ts-0.1.0.tar.gz", "has_sig": false, "md5_digest": "97c84f3ff0e2663fc615c86a96ad7208", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 21016, "upload_time": "2018-05-17T08:26:06", "url": "https://files.pythonhosted.org/packages/cb/58/a00b1fbbff90c3334d8030b494b79340ce924b7ec99a60c45996c589b96b/cobras_ts-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bf18a9121b9b9c04a2381fb4683db81e", "sha256": "f0fcafa9a92bbaca1962bb0a69d19287db87be1ec8666b155effba4c4490c81a" }, "downloads": -1, "filename": "cobras_ts-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "bf18a9121b9b9c04a2381fb4683db81e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 23277, "upload_time": "2018-05-17T08:26:04", "url": "https://files.pythonhosted.org/packages/b9/1d/17c224b02399e1df4dcea4d16dd1e23f407933fec16ddff860bb61f2b16c/cobras_ts-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "97c84f3ff0e2663fc615c86a96ad7208", "sha256": "7c3dcf0ed4afac847bd63bb71fd15546c896516c4b4226f03ae240dda7bbeb8d" }, "downloads": -1, "filename": "cobras_ts-0.1.0.tar.gz", "has_sig": false, "md5_digest": "97c84f3ff0e2663fc615c86a96ad7208", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 21016, "upload_time": "2018-05-17T08:26:06", "url": "https://files.pythonhosted.org/packages/cb/58/a00b1fbbff90c3334d8030b494b79340ce924b7ec99a60c45996c589b96b/cobras_ts-0.1.0.tar.gz" } ] }