Skip to content

Commit 7eef6f7

Browse files
committed
restrict the api to iterables, not matrices
1 parent c8c2f87 commit 7eef6f7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/ClusteringAPI.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ Cluster input `data` according to the algorithm specified by `ca`.
1313
All options related to the algorithm are given as keyword arguments when
1414
constructing `ca`.
1515
16-
The input data are a length-m vector of length-d vectors.
16+
The input `data` is a length-m iterable of "vectors" (data points).
1717
"Vector" here is considered in the generalized sense, i.e., any objects that
18-
a distance can be defined on them. Some clustering algorithms may allow alternative
19-
data input type for performance acceleration.
18+
a distance can be defined on them so that they can be clustered.
19+
In the majority of cases these are vectors of real numbers.
2020
2121
The output is always a subtype of `ClusteringResults` that can be further queried.
2222
The cluster labels are always the
@@ -27,10 +27,10 @@ get assigned negative integers, typically just `-1`.
2727
`ClusteringResults` subtypes always implement the following functions:
2828
2929
- `cluster_labels(cr)` returns a length-m vector `labels::Vector{Int}` containing
30-
the clustering labels (most of which are of `1:n` while some may be negative integers).
30+
the clustering labels , so that `data[i]` has label `labels[i]`.
3131
- `cluster_probs(cr)` returns `probs` a length-m vector of length-`n` vectors
3232
containing the "probabilities" or "score" of each point belonging to one of
33-
the created clusters (used with fuzzy clustering algorithms).
33+
the created clusters (useful for fuzzy clustering algorithms).
3434
- `cluster_number(cr)` returns `n`.
3535
3636
Other algorithm-related output can be obtained as a field of the result type,
@@ -51,7 +51,7 @@ function cluster_number(cr::ClusteringResults)
5151
end
5252

5353
"""
54-
cluster_labels(cr::ClusteringResults) → probs::Vector{Vector{Real}}
54+
cluster_labels(cr::ClusteringResults) → labels::Vector{Int}
5555
5656
Return the cluster labels of the data points used in [`cluster`](@ref).
5757
"""

0 commit comments

Comments
 (0)