Skip to content

Commit b458a08

Browse files
committed
more
1 parent 5ae2ba4 commit b458a08

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2131
-288
lines changed

.devel/sphinx/index.md

Lines changed: 13 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -24,71 +24,22 @@ Package **features**:
2424
* supports multiprocessing via OpenMP (on selected platforms).
2525

2626

27-
Possible applications in data analysis:
27+
Possible applications in topological data analysis:
2828
clustering ([HDBSCAN\*](https://hdbscan.readthedocs.io/en/latest/index.html),
2929
[Genie](https://genieclust.gagolewski.com/), Lumbermark, Single linkage, etc.),
30-
classification and regression (k-nearest neighbours),
30+
density estimation, dimensionality reduction,
3131
outlier and noise point detection, and many more.
3232

3333

34+
## Contributing
3435

36+
**quitefastmst** is distributed under the open source GNU AGPL v3 license.
37+
Its source code can be downloaded from [GitHub](https://github.com/gagolews/quitefastmst).
3538

36-
## How to Install
37-
38-
### Python Version
39-
40-
To install from [PyPI](https://pypi.org/project/quitefastmst), call:
41-
42-
```bash
43-
pip3 install quitefastmst # python3 -m pip install quitefastmst
44-
```
45-
46-
*To learn more about Python, check out my open-access textbook*
47-
[Minimalist Data Wrangling in Python](https://datawranglingpy.gagolewski.com/).
48-
49-
50-
51-
For best performance, advanced users will benefit from compiling the package
52-
from sources:
53-
54-
```bash
55-
CPPFLAGS="-O3 -march=native" pip3 install quitefastmst --force --no-binary="quitefastmst"
56-
```
57-
58-
🚧 TO DO (help needed): How to enable OpenMP support on macOS/Darwin in `setup.py`?
59-
60-
61-
62-
### R Version
63-
64-
To install from [CRAN](https://CRAN.R-project.org/package=quitefastmst), call:
65-
66-
```r
67-
install.packages("quitefastmst")
68-
```
69-
70-
*To learn more about R, check out my open-access textbook*
71-
[Deep R Programming](https://deepr.gagolewski.com/).
72-
73-
74-
75-
76-
For best performance, advanced users will benefit from compiling the package
77-
from sources:
78-
79-
```r
80-
Sys.setenv(CXX_DEFS="-O3 -march=native") # for gcc and clang
81-
install.packages("quitefastmst", type="source")
82-
```
83-
84-
85-
86-
87-
## Contributing
39+
The Python version is available from [PyPI](https://pypi.org/project/quitefastmst)
40+
and the R one from [CRAN](https://CRAN.R-project.org/package=quitefastmst).
8841

89-
*quitefastmst* is distributed under the open source GNU AGPL v3 license
90-
and can be downloaded from [GitHub](https://github.com/gagolews/quitefastmst).
91-
The core functionality is implemented in the form of a C++ library,
42+
However, the core functionality is implemented in the form of a C++ library,
9243
so it may be adapted to new projects relatively easily:
9344
any valuable contributions are welcome (Julia or Matlab bindings, etc.).
9445

@@ -114,10 +65,14 @@ CRAN Entry <https://CRAN.R-project.org/package=quitefastmst>
11465

11566
::::{toctree}
11667
:maxdepth: 1
117-
:caption: Reference Manual
68+
:caption: Documentation
11869
:hidden:
11970

71+
weave/definitions
72+
weave/benchmarks
73+
weave/python
12074
pythonapi
75+
weave/r
12176
rapi
12277
::::
12378

.devel/sphinx/pythonapi.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ Python Package `quitefastmst` Reference
22
=======================================
33

44
.. autosummary::
5-
quitefastmst.mst_euclid
65
quitefastmst.knn_euclid
6+
quitefastmst.mst_euclid
77

88

99
.. automodule:: quitefastmst
10-
:members: mst_euclid, knn_euclid
10+
:members: knn_euclid, mst_euclid

.devel/sphinx/rapi/mst_euclid.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
## Description
44

5-
The function determines the/a(\*) minimum spanning tree (MST) of a set of $n$ points, i.e., an acyclic undirected graph whose vertices represent the points, and $n-1$ edges with the minimal sum of weights, given by the pairwise distances. MSTs have many uses in, amongst others, topological data analysis (clustering, dimensionality reduction, etc.).
5+
The function determines the/a(\*) minimum spanning tree (MST) of a set of $n$ points, i.e., an acyclic undirected connected graph whose vertices represent the points, edges are weighted by the distances between point pairs, and have minimal total weight.
66

7-
For $M\leq 2$, we get a spanning tree that minimises the sum of Euclidean distances between the points. If $M=2$, the function additionally returns the distance to each point\'s nearest neighbour.
7+
MSTs have many uses in, amongst others, topological data analysis (clustering, density estimation, dimensionality reduction, outlier detection, etc.).
88

9-
If $M>2$, the spanning tree is the smallest wrt the degree-M mutual reachability distance (Campello et al., 2013) given by $d_M(i, j)=\max\{ c_M(i), c_M(j), d(i, j)\}$, where $d(i,j)$ is the Euclidean distance between the $i$-th and the $j$-th point, and $c_M(i)$ is the $i$-th $M$-core distance defined as the distance between the $i$-th point and its $(M-1)$-th nearest neighbour (not including the query points themselves). In clustering and density estimation, M plays the role of a smoothing factor; see (Campello et al. 2015) and the references therein for discussion.
9+
In clustering and density estimation, the parameter `M` plays the role of a smoothing factor; see (Campello et al. 2015) and the references therein for discussion. It corresponds to the <span class="pkg">hdbscan</span> Python package\'s `min_samples=M-1`.
10+
11+
For $M\leq 2$, we get a spanning tree that minimises the sum of uclidean distances between the points, i.e., the classic Euclidean minimum spanning tree (EMST). If $M=2$, the function additionally returns the distance to each point\'s nearest neighbour.
12+
13+
If $M>2$, the spanning tree is the smallest wrt the degree-M mutual reachability distance (Campello et al., 2013) given by $d_M(i, j)=\max\{ c_M(i), c_M(j), d(i, j)\}$, where $d(i,j)$ is the Euclidean distance between the $i$-th and the $j$-th point, and $c_M(i)$ is the $i$-th $M$-core distance defined as the distance between the $i$-th point and its $(M-1)$-th nearest neighbour (not including the query points themselves).
1014

1115
## Usage
1216

.devel/sphinx/weave/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Copyright (c) 2013-2025, Marek Gagolewski <https://www.gagolewski.com>
22

3-
FILES_RMD =
3+
FILES_RMD = \
4+
definitions.Rmd \
5+
benchmarks.Rmd \
6+
python.Rmd \
7+
r.Rmd
48

59
RMD_MD_OUTPUTS=$(patsubst %.Rmd,%.md,$(FILES_RMD))
610

.devel/sphinx/weave/benchmarks.Rmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Benchmarks

.devel/sphinx/weave/benchmarks.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
3+
4+
5+
# Benchmarks

.devel/sphinx/weave/definitions.Rmd

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Definitions
2+
3+
The minimum spanning tree (MST) of a set of *n* points is an acyclic undirected
4+
connected graph whose:
5+
6+
* vertices represent the points,
7+
* edges are weighted by the distances between point pairs,
8+
* edges have minimal total weight.
9+
10+
MSTs have many uses in, amongst others, topological data analysis
11+
(clustering, density estimation, dimensionality reduction,
12+
outlier detection, etc.).
13+
14+
15+
The `mst_euclid` function can determine the classic
16+
Euclidean minimum spanning trees (EMST) as well as ones
17+
corresponding to mutual reachability distances {cite}`hdbscan`.
18+
19+
20+
21+
::::{note}
22+
This section is a work in progress.
23+
24+
In the meantime, take a look at the
25+
[Python](../pythonapi) or
26+
[R](../rapi)
27+
package reference manual.
28+
::::

.devel/sphinx/weave/definitions.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
3+
4+
5+
# Definitions
6+
7+
The minimum spanning tree (MST) of a set of *n* points is an acyclic undirected
8+
connected graph whose:
9+
10+
* vertices represent the points,
11+
* edges are weighted by the distances between point pairs,
12+
* edges have minimal total weight.
13+
14+
MSTs have many uses in, amongst others, topological data analysis
15+
(clustering, density estimation, dimensionality reduction,
16+
outlier detection, etc.).
17+
18+
19+
The `mst_euclid` function can determine the classic
20+
Euclidean minimum spanning trees (EMST) as well as ones
21+
corresponding to mutual reachability distances {cite}`hdbscan`.
22+
23+
24+
25+
::::{note}
26+
This section is a work in progress.
27+
28+
In the meantime, take a look at the
29+
[Python](../pythonapi) or
30+
[R](../rapi)
31+
package reference manual.
32+
::::

.devel/sphinx/weave/python.Rmd

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Python Examples
2+
3+
*To learn more about Python, check out my open-access textbook*
4+
[Minimalist Data Wrangling in Python](https://datawranglingpy.gagolewski.com/).
5+
6+
7+
8+
9+
## How to Install
10+
11+
To install the package from [PyPI](https://pypi.org/project/quitefastmst), call:
12+
13+
```bash
14+
pip3 install quitefastmst # python3 -m pip install quitefastmst
15+
```
16+
17+
18+
For best performance, advanced users will benefit from compiling the package
19+
from sources:
20+
21+
```bash
22+
CPPFLAGS="-O3 -march=native" pip3 install quitefastmst --force --no-binary="quitefastmst"
23+
```
24+
25+
🚧 TO DO (help needed): How to enable OpenMP support on macOS/Darwin in `setup.py`?
26+
27+
28+
## Basic Use
29+
30+
<!--
31+
```python3
32+
import quitefastmst
33+
quitefastmst.knn_euclid(X, k, ...)
34+
quitefastmst.mst_euclid(X, M=1, ...)
35+
```
36+
-->
37+
38+
::::{note}
39+
This section is a work in progress.
40+
In the meantime, take a look at the examples in the [reference manual](../pythonapi).
41+
::::

.devel/sphinx/weave/python.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
3+
4+
5+
# Python Examples
6+
7+
*To learn more about Python, check out my open-access textbook*
8+
[Minimalist Data Wrangling in Python](https://datawranglingpy.gagolewski.com/).
9+
10+
11+
12+
13+
## How to Install
14+
15+
To install the package from [PyPI](https://pypi.org/project/quitefastmst), call:
16+
17+
18+
```bash
19+
pip3 install quitefastmst # python3 -m pip install quitefastmst
20+
```
21+
22+
23+
For best performance, advanced users will benefit from compiling the package
24+
from sources:
25+
26+
27+
```bash
28+
CPPFLAGS="-O3 -march=native" pip3 install quitefastmst --force --no-binary="quitefastmst"
29+
```
30+
31+
🚧 TO DO (help needed): How to enable OpenMP support on macOS/Darwin in `setup.py`?
32+
33+
34+
## Basic Use
35+
36+
37+
::::{note}
38+
This section is a work in progress.
39+
In the meantime, take a look at the examples in the [reference manual](../pythonapi).
40+
::::

0 commit comments

Comments
 (0)