Skip to main content

klustakwik2

https://travis-ci.org/kwikteam/klustakwik2.svg?branch=master

NOTE: please follow the instructions for the klusta package https://github.com/kwikteam/klusta : the instructions below should not be used.

Installation instructions

Install Python using the Anaconda distribution. You will need to install the packages numpy, scipy, cython and nose. For Windows, Python 2.7 might be a better option than 3.x.

On all platforms, KlustaKwik can be installed using pip install klustakwik2 (from source) or conda install -c kwikteam klustakwik2 (precompiled binary). The default installation options are as follows:

  • Linux: Multithreading on by default.

  • Windows: Multithreading on by default if MSVC installed, otherwise off. Note that under the Anaconda distribution, multithreading will be off by default, but this can be easily resolved if you have MSVC installed, see below.

  • Mac: Multithreading off by default.

To override these options, install from source (see below).

Multithreading with Anaconda on Windows

The Anaconda distribution installs its own compiler that doesn’t support OpenMP for multithreading and uses this by default instead of the MSVC compiler, which does support OpenMP. To disable the Anaconda compiler, simply run the following command before installing KlustaKwik.

conda remove libpython

Installing from source

Download the source, either from one of the source distributions on PyPI or get the latest version from GitHub. Run one of the following commands from a command prompt in this directory. For default options:

python setup.py install

To force multithreading to be on:

python setup.py install –with-openmp

To force multithreading to be off:

python setup.py install –no-openmp

Windows

Install a precompiled Windows binary with Anaconda in an anaconda package:

conda install -c kwikteam klustakwik2

If you wish to compile from source, the instructions are a bit more complicated:

Using Python 2.7, you will need a copy of MS Visual Studio Express 2008 for Python, available for free download here. Python 3.x might require a different version of Visual Studio, we haven’t tested this.

Download the source as above. Open a command prompt in the directory where you downloaded and extracted the files. If you installed Python for all users, then you will need admin rights on this command prompt. To get this in Windows, press the Windows key, type “cmd”, right click on “cmd.exe” and click “Run as administrator”.

Now run the commands as in the section on installing from source above.

Mac

It is possible to install a version of gcc that allows for multithreading. TODO: details.

Usage

To cluster a pair of files name.fet.n, name.fmask.n run the command:

kk2_legacy name n

This will generate a name.klg.n and name.clu.n file. Note that the first time you run it, it will generate a whole lot of warnings and compiler output: ignore this, it is normal.

You can specify additional options to this script. The major ones are explained below:

  • max_iterations=1000: the maximum number of full iterations to carry out before giving up.

  • max_possible_clusters=1000: the maximum number of clusters to output at the end. At the moment, this option limits RAM usage but in a future version there will be no such limit.

  • drop_last_n_features=0: don’t use the last N features of the fet file for clustering.

  • save_clu_every=None: how often (in minutes) to save a temporary .clu file.

  • num_starting_clusters=500: how many initial clusters to use (should probably be higher than the number of final clusters you expect to find).

  • start_from_clu=None: if specified, start the clustering from a previously saved .clu file.

  • use_mua_cluster=True: whether or not to use “black hole” MUA cluster variant of the algorithm. This is designed to improve clustering on noisier data sets, but you can turn it off if you are having problems with it. Note that if this is on, cluster 2 will be the MUA cluster, and the first ‘normal’ cluster will be cluster 3.

Metadata

Release files for klustakwik2 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for klustakwik2 0.2.7
File Interpreter ABI Platform
klustakwik2-0.2.7-cp37-cp37m-manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details
klustakwik2-0.2.7-cp36-cp36m-manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
klustakwik2-0.2.7-cp27-cp27m-manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64 Details

Total release size: 8.9 MB

Release files / klustakwik2-0.2.7-cp37-cp37m-manylinux1_x86_64.whl

Download URL klustakwik2-0.2.7-cp37-cp37m-manylinux1_x86_64.whl
Size 3.0 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
09c45022f11d5c6aaa1b05d43f6d32bfda1cf079fc38f0d18810d814914953f7
BLAKE2b-256 checksum
How to use checksums
ee325c5d17c23af19bc85a7ad5a74d1a604d47de6761af88bcc2069eafb9b9c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

Release files / klustakwik2-0.2.7-cp36-cp36m-manylinux1_x86_64.whl

Download URL klustakwik2-0.2.7-cp36-cp36m-manylinux1_x86_64.whl
Size 3.0 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
2c9821086513f4563446a0519181538aef08711a0a702a393ccacb7004244bcd
BLAKE2b-256 checksum
How to use checksums
6c4d840da8eb78038dec6c1b3ffdf02dfd30f02ad8c32ad64aae732c81df2f39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

Release files / klustakwik2-0.2.7-cp27-cp27m-manylinux1_x86_64.whl

Download URL klustakwik2-0.2.7-cp27-cp27m-manylinux1_x86_64.whl
Size 2.9 MB
Tags CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
2d9510048cc7b9cb5725ca8a2c44fdf5ad0db41fc96179a68314fe2b538caa24
BLAKE2b-256 checksum
How to use checksums
1ed285b391ecb17cfc75b2766aa3035b6b91cdd8ed3118676fa5f8cc46d8597d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.2.7 This release

3 release files

0.2.6

3 release files

0.2.5

2 release files

0.2.4

3 release files

0.2.3

3 release files

0.2.2

3 release files

0.2.1

3 release files

0.2.0

3 release files

0.1.0

3 release files

0.1.0b

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page