MiSTree

MiSTree: a Python package for constructing and analysing Minimum Spanning Trees - Published in JOSS (2019)

https://github.com/knaidoo29/mistree

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    2 of 3 committers (66.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

cosmology graph-theory levy-walks minimum-spanning-tree minimum-spanning-trees python random-walk

Scientific Fields

Artificial Intelligence and Machine Learning Computer Science - 83% confidence
Mathematics Computer Science - 63% confidence
Last synced: 4 months ago · JSON representation

Repository

A python package for constructing and analysing minimum spanning trees.

Basic Info
  • Host: GitHub
  • Owner: knaidoo29
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 31 MB
Statistics
  • Stars: 51
  • Watchers: 1
  • Forks: 22
  • Open Issues: 0
  • Releases: 4
Topics
cosmology graph-theory levy-walks minimum-spanning-tree minimum-spanning-trees python random-walk
Created almost 7 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Codemeta

README.md

MiSTree

| | | |---------------|------------------------------------------| | Author | Krishna Naidoo |
| Version | 2.0.0 | | Repository | https://github.com/knaidoo29/mistree | | Documentation | https://knaidoo29.github.io/mistreedoc/ |

MiSTree Version PyPI version Python Version Support Ubuntu MacOS Windows coverage License: MIT status ascl DOI Binder

Introduction

The minimum spanning tree (MST), a graph constructed from a distribution of points, draws lines between pairs of points so that all points are linked in a single skeletal structure that contains no loops and has minimal total edge length. The MST has been used in a broad range of scientific fields such as particle physics, in astronomy and cosmology. Its success in these fields has been driven by its sensitivity to the spatial distribution of points and the patterns within. MiSTree, a public Python package, allows a user to construct the MST in a variety of coordinates systems, including Celestial coordinates used in astronomy. The package enables the MST to be constructed quickly by initially using a k-nearest neighbour graph (k NN, rather than a matrix of pairwise distances) which is then fed to Kruskal's algorithm to construct the MST. MiSTree enables a user to measure the statistics of the MST and provides classes for binning the MST statistics (into histograms) and plotting the distributions. Applying the MST will enable the inclusion of high-order statistics information from the cosmic web which can provide additional information to improve cosmological parameter constraints. This information has not been fully exploited due to the computational cost of calculating N-point statistics. MiSTree was designed to be used in cosmology but could be used in any field which requires extracting non-Gaussian information from point distributions.

Dependencies

  • numpy
  • numba
  • matplotlib
  • scipy
  • scikit-learn

For testing you will require nose or pytest.

Installation

MiSTree can be installed as follows:

pip install mistree [--user] The --user is optional and only required if you don’t have write permission. If you are using a windows machine this may not work, in this case (or as an alternative to pip) clone the repository,

git clone https://github.com/knaidoo29/mistree.git cd mistree

and install by either running

pip install . [--user]

or

python setup.py build python setup.py install

Similarly, if you would like to work and edit mistree you can clone the repository and install an editable version:

git clone https://github.com/knaidoo29/mistree.git cd mistree pip install -e . [--user]

From the mistree directory you can then test the install using nose:

python setup.py test

or using pytest:

python -m pytest

You should now be able to import the module:

python import mistree as mist

Documentation

In depth documentation and tutorials are provided here.

Tutorials

The tutorials in the documentation are supplied as ipython notebooks which can be downloaded from here or can be run online using binder.

Citing

You can cite MiSTree using the following BibTex:

@ARTICLE{Naidoo2019, author = {{Naidoo}, Krishna}, title = "{MiSTree: a Python package for constructing and analysing Minimum Spanning Trees}", journal = {The Journal of Open Source Software}, year = "2019", month = "Oct", volume = {4}, number = {42}, eid = {1721}, pages = {1721}, doi = {10.21105/joss.01721}, adsurl = {https://ui.adsabs.harvard.edu/abs/2019JOSS....4.1721N} }

Support

If you have any issues with the code or want to suggest ways to improve it please open a new issue (here) or (if you don't have a github account) email krishna.naidoo.11@ucl.ac.uk.

Owner

  • Name: Krishna Naidoo
  • Login: knaidoo29
  • Kind: user
  • Location: London

Research Fellow in Large Scale Structure at the University of Portsmouth

JOSS Publication

MiSTree: a Python package for constructing and analysing Minimum Spanning Trees
Published
October 17, 2019
Volume 4, Issue 42, Page 1721
Authors
Krishna Naidoo ORCID
Department of Physics \& Astronomy, University College London, Gower Street, London, WC1E 6BT, UK
Editor
Juanjo Bazán ORCID
Tags
astronomy cosmology graphs

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "name": "MiSTree: Construct and analyze Minimum Spanning Tree graphs",
  "description": "MiSTree quickly constructs minimum spanning tree graphs for various coordinate systems, including Celestial coordinates, by using a k-nearest neighbor graph (kNN, rather than a matrix of pairwise distances) which is then fed to Kruskal's algorithm to create the graph. MiSTree bins the MST statistics into histograms and plots the distributions; enabling the inclusion of high-order statistics information from the cosmic web to provide additional information that improves cosmological parameter constraints. Though MiSTree was designed for use in cosmology, it can be used in any field requiring extracting non-Gaussian information from point distributions.",
  "identifier": "ascl:1910.016",
  "author": [
    {
      "@type": "Person",
      "givenName": "Krishna",
      "familyName": "Naidoo",
      "id": "0000-0002-9182-1802"
    }
  ],
  "citation": "https://ui.adsabs.harvard.edu/abs/2019ascl.soft10016N",
  "relatedLink": [
    "PLACEHOLDER: Add related links here"
  ],
  "codeRepository": "https://github.com/knaidoo29/mistree",
  "referencePublication": [
    {
      "@type": "ScholarlyArticle",
      "url": "https://ui.adsabs.harvard.edu/abs/2019JOSS....4.1721N",
      "id": "10.21105/joss.00045"
    }
  ],
  "version": "1.2.0",
  "license": "https://spdx.org/licenses/MIT.html"
}

GitHub Events

Total
  • Create event: 2
  • Release event: 1
  • Issues event: 6
  • Watch event: 3
  • Delete event: 2
  • Issue comment event: 16
  • Push event: 32
  • Pull request event: 4
Last Year
  • Create event: 2
  • Release event: 1
  • Issues event: 6
  • Watch event: 3
  • Delete event: 2
  • Issue comment event: 16
  • Push event: 32
  • Pull request event: 4

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 204
  • Total Committers: 3
  • Avg Commits per committer: 68.0
  • Development Distribution Score (DDS): 0.328
Past Year
  • Commits: 31
  • Committers: 1
  • Avg Commits per committer: 31.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Krishna Naidoo k****a@k****l 137
Krishna Naidoo k****1@u****k 66
Krishna Naidoo k****a@e****k 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total 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
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
  • Kennyc222 (1)
  • yangfeng-Lyu (1)
  • MalteMederacke (1)
  • cloneorcopy (1)
Pull Request Authors
  • knaidoo29 (2)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • matplotlib *
  • numpy *
  • scikit-learn *
  • scipy *
setup.py pypi
  • matplotlib *
  • numpy *
  • scikit-learn *
  • scipy *
.github/workflows/python-package.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v3 composite
.github/workflows/python-package_macos.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v3 composite
.github/workflows/python-package_windows.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v3 composite
environment.yml conda
  • matplotlib
  • numpy
  • pip
  • scikit-learn
  • scipy