Description Usage Arguments Value Methods (by class) Author(s) References Examples
Provides the vector of clusters' ID to which each element belong to.
1 2 3 4 5 6 7 | cc_get_cluster(x, n_elem)
## Default S3 method:
cc_get_cluster(x, n_elem)
## S3 method for class 'crossclustering'
cc_get_cluster(x, n_elem)
|
x |
list of clustered elements or a |
n_elem |
total number of elements clustered (ignored if x
is of class |
An integer vector of clusters to which the elements belong ('1' for the outliers, ID + 1 for the others).
default
: default method for cc_get_cluster
.
crossclustering
: automatically extract inputs from a crossclustering
object
Paola Tellaroli, <paola [dot] tellaroli [at] unipd [dot] it>;; Marco Bazzi, <bazzi [at] stat [dot] unipd [dot] it>; Michele Donato, <mdonato [at] stanford [dot] edu>.
Tellaroli P, Bazzi M., Donato M., Brazzale A. R., Draghici S. (2016). Cross-Clustering: A Partial Clustering Algorithm with Automatic Estimation of the Number of Clusters. PLoS ONE 11(3): e0152333. doi:10.1371/journal.pone.0152333
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | library(CrossClustering)
data(toy)
### toy is transposed as we want to cluster samples (columns of the
### original matrix)
toy_dist <- t(toy) %>% dist(method = "euclidean")
### Run CrossClustering
toyres <- cc_crossclustering(toy_dist,
k_w_min = 2,
k_w_max = 5,
k2_max = 6,
out = TRUE
)
### cc_get_cluster
cc_get_cluster(toyres[], 7)
### cc_get_cluster directly from a crossclustering object
cc_get_cluster(toyres)
|
[1] 2 2 3 3 4 4 1
[1] 2 2 3 3 4 4 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.