https://github.com/janjoswig/commonnnclustering
A Python package for common-nearest-neighbours clustering
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 3 committers (66.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (18.5%) to scientific vocabulary
Keywords
Repository
A Python package for common-nearest-neighbours clustering
Basic Info
Statistics
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Common-nearest-neighbour clustering
NOTE
This project is now under further development at https://github.com/bkellerlab/CommonNNClustering. Please refer to this new version for updates.
cnnclustering
The cnnclustering Python package provides a flexible interface to use the common-nearest-neighbours cluster algorithm. While the method can be applied to arbitrary data, this implementation was made before the background of processing trajectories from Molecular Dynamics simulations. In this context the cluster result can serve as a suitable basis for the construction of a core-set Markov-state (cs-MSM) model to capture the essential dynamics of the underlying molecular processes. For a tool for cs-MSM estimation, refer to this separate project.
The package provides a main module:
cluster: User interface to (hierarchical) common-nearest-neighbour clustering
Further, it contains the modules:
plot: Convenience functions to evaluate cluster results_types: Direct access to generic types representing needed cluster components_fit: Direct access to generic clustering procedures
Features:
- Flexible: Clustering can be done for data sets in different input formats. Easy interfacing with external methods.
- Convenient: Integration of functionality, handy in the context of Molecular Dynamics.
- Fast: Core functionalities implemented in Cython.
Please refer to the following papers for the scientific background (and consider citing if you find the method useful):
- B. Keller, X. Daura, W. F. van Gunsteren J. Chem. Phys., 2010, 132, 074110.
- O. Lemke, B.G. Keller J. Chem. Phys., 2016, 145, 164104.
- O. Lemke, B.G. Keller Algorithms, 2018, 11, 19.
Documentation
The package documentation (under developement) is available here online or under docs/index.html.
The sources for the documentation can be found under docsrc/.
Install
Refer to the documentation for more details. Install from PyPi
bash
$ pip install cnnclustering
or clone the development version and install from a local branch
bash
$ git clone https://github.com/janjoswig/CommonNNClustering.git
$ cd CommonNNClustering
$ pip install .
Quickstart
```python
from cnnclustering import cluster
2D data points (list of lists, 12 points in 2 dimensions)
data_points = [ # point index ... [0, 0], # 0 ... [1, 1], # 1 ... [1, 0], # 2 ... [0, -1], # 3 ... [0.5, -0.5], # 4 ... [2, 1.5], # 5 ... [2.5, -0.5], # 6 ... [4, 2], # 7 ... [4.5, 2.5], # 8 ... [5, -1], # 9 ... [5.5, -0.5], # 10 ... [5.5, -1.5], # 11 ... ]
clustering = cluster.Clustering(datapoints) clustering.fit(radiuscutoff=1.5, cnn_cutoff=1, v=False) clustering.labels array([1, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2])
```

Alternative scikit-learn implementation
We provide an alternative approach to common-nearest-neighbours clustering in the spirit of the scikit-learn project within scikit-learn-extra.
Owner
- Name: Jan-Oliver Kapp-Joswig
- Login: janjoswig
- Kind: user
- Location: Oxford, UK
- Company: Exscientia AI
- Repositories: 4
- Profile: https://github.com/janjoswig
GitHub Events
Total
- Issues event: 4
- Issue comment event: 4
Last Year
- Issues event: 4
- Issue comment event: 4
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jan-Oliver Joswig | j****g@f****e | 335 |
| Jan-Oliver Joswig | 3****g | 19 |
| Jan-Oliver Joswig | j****Å@f****e | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 10
- Total pull requests: 12
- Average time to close issues: about 2 years
- Average time to close pull requests: 11 days
- Total issue authors: 3
- Total pull request authors: 2
- Average comments per issue: 1.9
- Average comments per pull request: 0.25
- Merged pull requests: 9
- Bot issues: 0
- Bot pull requests: 3
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- janjoswig (8)
- egy1st (1)
- edikedik (1)
Pull Request Authors
- janjoswig (9)
- dependabot[bot] (3)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 11 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 9
- Total maintainers: 1
pypi.org: cnnclustering
A Python package for common-nearest-neighbours clustering
- Homepage: https://github.com/janjoswig/CommonNNClustering
- Documentation: https://cnnclustering.readthedocs.io/
- License: MIT License
-
Latest release: 0.5.0
published over 4 years ago
Rankings
Maintainers (1)
Dependencies
- cython >=0.29 development
- ipython *
- nbsphinx *
- rstcheck *
- sphinx *
- sphinxcontrib-napoleon *
- matplotlib *
- networkx *
- pandas *
- scikit-learn *
- scipy *
- coverage ==4.5 test
- coveralls * test
- flake8 * test
- pytest * test
- pytest-mock * test
- pytest-raises * test
- pytest-regressions * test
- PyYAML *
- numpy *
- tqdm *