Skip to content

Commit 5aff3e0

Browse files
committed
adapted WIP docs for re-factored code
1 parent 09e750a commit 5aff3e0

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ You can grab the latest stable version of this package by simply running in Juli
2929
Don't forget to Julia's package manager with `]`
3030

3131
```julia
32-
pkg> add TextAnalysis
32+
pkg> add ParallelKMeans
3333
```
3434

3535
For the few (and selected) brave ones, one can simply grab the current experimental features by simply adding the experimental branch to your development environment after invoking the package manager with `]`:

docs/src/index.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can grab the latest stable version of this package by simply running in Juli
2121
Don't forget to Julia's package manager with `]`
2222

2323
```julia
24-
pkg> add TextAnalysis
24+
pkg> add ParallelKMeans
2525
```
2626

2727
For the few (and selected) brave ones, one can simply grab the current experimental features by simply adding the experimental branch to your development environment after invoking the package manager with `]`:
@@ -38,13 +38,14 @@ git checkout experimental
3838
## Features
3939
- Lightening fast implementation of Kmeans clustering algorithm even on a single thread in native Julia.
4040
- Support for multi-theading implementation of Kmeans clustering algorithm.
41-
- Kmeans++ initialization for faster and better convergence.
41+
- 'Kmeans++' initialization for faster and better convergence.
4242
- Modified version of Elkan's Triangle inequality to speed up K-Means algorithm.
4343

4444

4545
## Pending Features
4646
- [X] Implementation of Triangle inequality based on [Elkan C. (2003) "Using the Triangle Inequality to Accelerate
47-
K-Means"](https://www.aaai.org/Papers/ICML/2003/ICML03-022.pdf)
47+
K-Means"](https://www.aaai.org/Papers/ICML/2003/ICML03-022.pdf).
48+
- [ ] Implementation of current k-means acceleration algorithms.
4849
- [ ] Support for DataFrame inputs.
4950
- [ ] Refactoring and finalizaiton of API desgin.
5051
- [ ] GPU support.
@@ -93,21 +94,21 @@ scatter(iris.PetalLength, iris.PetalWidth, marker_z=result.assignments,
9394
using ParallelKMeans
9495

9596
# Single Thread Implementation of Lloyd's Algorithm
96-
b = [ParallelKMeans.kmeans(X, i, ParallelKMeans.SingleThread(),
97-
tol=1e-6, max_iters=300, verbose=false).totalcost for i = 2:10]
97+
b = [ParallelKMeans.kmeans(X, i, n_threads=1;
98+
tol=1e-6, max_iters=300, verbose=false).totalcost for i = 2:10]
9899

99100
# Multi Thread Implementation of Lloyd's Algorithm
100-
c = [ParallelKMeans.kmeans(X, i, ParallelKMeans.MultiThread(),
101-
tol=1e-6, max_iters=300, verbose=false).totalcost for i = 2:10]
101+
c = [ParallelKMeans.kmeans(X, i; tol=1e-6, max_iters=300, verbose=false).totalcost for i = 2:10]
102102

103-
# Multi Thread Implementation plus a modified version of Elkan's triangiulity of inequaltiy
103+
# Single Thread Implementation plus a modified version of Elkan's triangiulity of inequaltiy
104104
# to boost speed
105-
d = [ParallelKMeans.kmeans(ParallelKMeans.LightElkan(), X, i, ParallelKMeans.MultiThread(),
106-
tol=1e-6, max_iters=300, verbose=false).totalcost for i = 2:10]
105+
e = [ParallelKMeans.kmeans(ParallelKMeans.LightElkan(), X, i,
106+
n_threads=1, tol=1e-6, max_iters=300,
107+
verbose=false).totalcost for i = 2:10]
107108

108-
# Single Thread Implementation plus a modified version of Elkan's triangiulity of inequaltiy
109+
# Multi Thread Implementation plus a modified version of Elkan's triangiulity of inequaltiy
109110
# to boost speed
110-
e = [ParallelKMeans.kmeans(ParallelKMeans.LightElkan(), X, i, ParallelKMeans.SingleThread(),
111+
d = [ParallelKMeans.kmeans(ParallelKMeans.LightElkan(), X, i;
111112
tol=1e-6, max_iters=300, verbose=false).totalcost for i = 2:10]
112113
```
113114

src/kmeans.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# All Abstract types defined
32
"""
43
AbstractKMeansAlg

0 commit comments

Comments
 (0)