Skip to content

Commit 34211cd

Browse files
committed
update 'how to install' in docs
1 parent f6edbf7 commit 34211cd

File tree

2 files changed

+38
-14
lines changed

2 files changed

+38
-14
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,24 @@ This package was <ins>**built from scratch**</ins>, entirely in [Julia Lang](jul
88

99
This is mostly a learning experiment, but the package were also built and documented to be used by anyone, Plug-and-Play. Just input your data as an Array or a [Tables.jl](https://discourse.julialang.org/t/tables-jl-a-table-interface-for-everyone/14071) type (like [DataFrames.jl](https://dataframes.juliadata.org/stable/)), then start training your clusters algorithms and analyze your results.
1010

11+
Documentation: [https://augustocl.github.io/ClusterAnalysis.jl/](https://augustocl.github.io/ClusterAnalysis.jl/)
12+
1113
## Algorithms Implemented
1214
Currently we implemented two types of algorithms, a partitioned based ([K-Means](https://en.wikipedia.org/wiki/K-means_clustering)) and a spatial density based ([DBSCAN](https://en.wikipedia.org/wiki/DBSCAN)).
1315

16+
> Go check the `Algorithms Overview` Section that contains all the details of how it works the algorithm and also got the bibliography and papers used during the research and development of the code.
1417
15-
## Algorithm's Overview
16-
Go check the algorithm's overview, in [documentation](https://augustocl.github.io/ClusterAnalysis.jl/algorithms/kmeans.html) that contains all the details of how it works the algorithm and also got the bibliography and papers used during the research and development of the code.
17-
18-
> It's a great introduction to the algorithm and a good resource to read along with the source code.
18+
>It's a great introduction to the algorithm and a good resource to read along with the source code.
1919
2020
- [DBSCAN](https://augustocl.github.io/ClusterAnalysis.jl/algorithms/dbscan.html)
2121
- [K-Means](https://augustocl.github.io/ClusterAnalysis.jl/algorithms/kmeans.html)
2222

2323
## How to install ClusterAnalysis.jl
24-
Since this package it's not registred, it's necessary to use the github url as shown below.
2524

2625
```julia
2726
# press ] to enter in Pkg REPL mode.
2827
julia> ]
29-
pkg> add https://github.com/AugustoCL/ClusterAnalysis.jl
28+
pkg> add ClusterAnalysis
3029
```
3130

3231
## To-Do

docs/src/index.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,47 @@
11
# ClusterAnalysis.jl
22

3-
```@raw html
4-
<img src="plot_dbscan.png" width="70%">
5-
```
6-
7-
This package was **BUILT FROM SCRATCH**, entirely in [Julia Lang](https://julialang.org), and implements a few popular clustering algorithms like K-Means and DBSCAN.
3+
This package was **Built from scratch**, entirely in [Julia Lang](https://julialang.org), and implements a few popular clustering algorithms like K-Means and DBSCAN.
84

95
This is mostly a learning experiment, but the package were also built and documented to be used by anyone, Plug-and-Play. Just input your data as an Array or a [Tables.jl](https://discourse.julialang.org/t/tables-jl-a-table-interface-for-everyone/14071) type (like [DataFrames.jl](https://dataframes.juliadata.org/stable/)), then start training your clusters algorithms and analyze your results.
106

7+
118
## Algorithms Implemented
129
Currently we implemented two types of algorithms, a partitioned based ([K-Means](https://en.wikipedia.org/wiki/K-means_clustering)) and a spatial density based ([DBSCAN](https://en.wikipedia.org/wiki/DBSCAN)).
1310

14-
> Go check the `Algorithms` Section that contains all the details of how it works the algorithm and also got the bibliography and papers used during the research and development of the code. It's a great introduction to the algorithm and a good resource to read along with the source code.
11+
> Go check the `Algorithms` Section that contains all the details of how it works the algorithm and also got the bibliography and papers used during the research and development of the code.
12+
13+
> It's a great introduction to the algorithm and a good resource to read along with the source code.
1514
1615
## How to install ClusterAnalysis.jl
17-
Since this package it's not registred, it's necessary to use the github url as shown below.
1816

1917
```julia
2018
# press ] to enter in Pkg REPL mode.
21-
pkg> add https://github.com/AugustoCL/ClusterAnalysis.jl
19+
pkg> add ClusterAnalysis
2220
```
21+
22+
## A quick example
23+
24+
```julia
25+
using ClusterAnalysis, DataFrames, CSV
26+
27+
# load blob dataset from repo in github
28+
df = CSV.read("algo_overview/blob_data.csv", DataFrame, drop=[1]);
29+
X = df[:,1:2];
30+
y = df[:,end];
31+
32+
# parameters of k-means
33+
ϵ = 0.35;
34+
min_pts = 10;
35+
36+
# executing DBSCAN
37+
m = dbscan(X, ϵ, min_pts);
38+
39+
# plot
40+
scatter(X[:,1], X[:,2], zcolor=m.labels,
41+
leg=false,
42+
title="DBSCAN prediction\n(ϵ=$(ϵ), minPts=$(min_pts))")
43+
```
44+
45+
```@raw html
46+
<img src="plot_dbscan.png" width="70%">
47+
```

0 commit comments

Comments
 (0)