You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/index.md
+24-5Lines changed: 24 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
## Motivation
4
4
5
5
It's actually a funny story led to the development of this package.
6
-
What started off as a personal toy project trying to re-construct the K-Means algorithm in native Julia blew up after a heated discussion on the Julia Discourse forum when I asked for Julia optimizaition tips. Long story short, Julia community is an amazing one! Andrey offered his help and together, we decided to push the speed limits of Julia with a parallel implementation of the most famous clustering algorithm. The initial results were mind blowing so we have decided to tidy up the implementation and share with the world as a maintained Julia pacakge.
6
+
What started off as a personal toy project trying to re-construct the K-Means algorithm in native Julia blew up after a heated discussion on the Julia Discourse forum when I asked for Julia optimization tips. Long story short, Julia community is an amazing one! Andrey offered his help and together, we decided to push the speed limits of Julia with a parallel implementation of the most famous clustering algorithm. The initial results were mind blowing so we have decided to tidy up the implementation and share with the world as a maintained Julia pacakge.
7
7
8
8
Say hello to `ParallelKMeans`!
9
9
@@ -24,6 +24,22 @@ As a result, it is useful in practice to restart it several times to get the cor
24
24
25
25
## Installation
26
26
27
+
If you are using Julia in the recommended [Juno IDE](https://junolab.org/), the number of threads is already set to the number of available CPU cores so multithreading enabled out of the box.
28
+
For other IDEs, multithreading must be exported in your environment before launching the Julia REPL in the command line.
29
+
30
+
*TIP*: One needs to navigate or point to the Julia executable file to be able to launch it in the command line.
31
+
Enable multi threading on Mac/Linux systems via;
32
+
33
+
```bash
34
+
export JULIA_NUM_THREADS=n # where n is the number of threads/cores
35
+
```
36
+
37
+
For Windows systems:
38
+
39
+
```bash
40
+
set JULIA_NUM_THREADS=n # where n is the number of threads/cores
41
+
```
42
+
27
43
You can grab the latest stable version of this package from Julia registries by simply running;
28
44
29
45
*NB:* Don't forget to Julia's package manager with `]`
@@ -58,6 +74,7 @@ git checkout experimental
58
74
-[X] Full Implementation of Triangle inequality based on [Elkan - 2003 Using the Triangle Inequality to Accelerate K-Means"](https://www.aaai.org/Papers/ICML/2003/ICML03-022.pdf).
59
75
-[ ] Implementation of [Geometric methods to accelerate k-means algorithm](http://cs.baylor.edu/~hamerly/papers/sdm2016_rysavy_hamerly.pdf).
60
76
-[ ] Support for other distance metrics supported by [Distances.jl](https://github.com/JuliaStats/Distances.jl#supported-distances).
77
+
-[ ] Implementation of [Yinyang K-Means](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/ding15.pdf).
61
78
-[ ] Native support for tabular data inputs outside of MLJModels' interface.
62
79
-[ ] Refactoring and finalizaiton of API desgin.
63
80
-[ ] GPU support.
@@ -98,13 +115,14 @@ r.iterations # number of elapsed iterations
98
115
r.converged # whether the procedure converged
99
116
```
100
117
101
-
### Supported KMeans algorithm variations
118
+
### Supported KMeans algorithm variations and recommended use cases
-[Lloyd()](https://cs.nyu.edu/~roweis/csc2515-2006/readings/lloyd57.pdf) - Default algorithm but only recommended for very small matrices (switch to `n_threads = 1` to avoid overhead).
121
+
-[Hamerly()](https://www.researchgate.net/publication/220906984_Making_k-means_Even_Faster) - Useful in most cases. If uncertain about your use case, use this!
122
+
-[Elkan()](https://www.aaai.org/Papers/ICML/2003/ICML03-022.pdf) - Recommended for high dimensional data.
0 commit comments