Package: cobras-ts
Library for semi-supervised clustering using pairwise constraints.COBRAS supports three modes for constraint elicitation:Withlabeled data. in this case the pairwise relations are derived from the labels.
This is mainly used to compare COBRAS experimentally to competitors.Withinteraction through the commandline.
In this case the user is queried about the pairwise relations, and can answer with yes (y) and no (n)
through the commandline. The indices that are shown in the queries are the row indices in the specified
data matrix (starting from zero).Withinteraction through a visual user interface.
If you use COBRAS-TS, the instantiation of COBRAS that is tailored to time series clustering, you can use an
interactive web application that visualizes the data, queries, and intermediate clustering results. A demo can be
found athttps://dtai.cs.kuleuven.be/software/cobras/InstallationThis package is available on PyPi:$ pip install cobras_tsThe following dependencies are automatically installed: dtaidistance, kshape, numpy, scikit-learn.In case you want to use the interactive GUI, installcobras_tsusing the following command to
automatically install additional dependencies (bokeh, datashader, and cloudpickle):$ pip install pip cobras_ts[gui]If you want to additionally install tensorflow in order to cluster images:$ pip install pip cobras_ts[gui, images]Usage1. COBRAS from the command lineThe COBRAS algorithm can easily be run from the command line.
Acobras_tsscript will be installed by pip:$ cobras_ts --format=csv --labelcol=0 /path/to/UCR_TS_Archive_2015/ECG200/ECG200_TESTThis script is also available in the repository ascobras_ts_cli.py.2. COBRAS as a Python packageExamples of using COBRAS as a Python package can be found in theexamplessubdirectory.3. COBRAS in an jupyter notebookAn example on how to run COBRAS for time series clustering using a jupyter notebook can be found in examples/COBRAS_notebook_timeseries.ipynb.
An example for image clustering can be found in examples/COBRAS_notebook_images.ipynb.
In these examples, queries and results are plotted directly in the notebook and user feedback is given through the notebook prompt.4. COBRAS with a GUIFor instructions on using COBRAS with a GUI to cluster time series, see:https://dtai.cs.kuleuven.be/software/cobras/To run COBRAS on image data, add the –images option followed by the directory containing the images to be clustered.
Note: this requires tensorflow to be installed. For example:$ cobras_ts –visual –images cobras_ts/webapp_images/dataDocumentationAdditional documentation can be found athttps://ml-kuleuven.github.io/cobras/DependenciesThis package uses Python3, numpy, scikit-learn, kshape, tensorflow and dtaidistance.ContactToon Van Craenendonck attoonvancraenendonck@gmail.comLicenseCOBRAS code for semi-supervised time series clustering.Copyright 2018 KU Leuven, DTAI Research GroupLicensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.