Description Extends Fields Methods Author(s) See Also Examples
This is the class of the object returned by the COMMUNAL
function. It contains all the clustering results, including the values of the validation measures, and the cluster assignments. Cluster assignments for a particular number of clusters can be conveniently extracted with the getClustering(k)
method.
All reference classes extend and inherit methods from "envRefClass"
.
cluster.list
:Object of class list
List of all cluster assignments from each algorithm. Use the getClustering
method to conveniently extract clusters for a given value of k.
measures
:Object of class array
The validation measures calculated
clus.methods
:Object of class character
The clustering algorithms used.
ks
:Object of class numeric
The range of cluster numbers tested.
validation
:Object of class character
The validation measures used.
dist.metric
:Object of class character
The distance metric used to calculate validation scores.
item.names
:Object of class character
The names of the clustered items.
call
:Object of class call
The call to COMMUNAL
used to create the object.
getClustering(k)
: For given value of k
, extract the cluster assignments from each clustering algorithm.
show()
:Default print method.
Albert Chen and Timothy E Sweeney
Maintainer: Albert Chen acc2015@stanford.edu
Vignette and COMMUNAL
. The function COMMUNAL
returns an object of this class.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | showClass("COMMUNAL")
## Not run:
## create artificial data set with 3 distinct clusters
set.seed(1)
V1 = c(abs(rnorm(100, 2)), abs(rnorm(100, 50)), abs(rnorm(100, 140)))
V2 = c(abs(rnorm(100, 2, 8)), abs(rnorm(100, 55, 4)), abs(rnorm(100, 105, 1)))
data <- t(data.frame(V1, V2))
colnames(data) <- paste("Sample", 1:ncol(data), sep="")
rownames(data) <- paste("Gene", 1:nrow(data), sep="")
## run COMMUNAL with defaults
result <- COMMUNAL(data=data, ks=seq(2,5)) # result is a COMMUNAL object
k <- 3 # suppose optimal cluster number is 3
clusters <- result$getClustering(k) # extract clusters
mat.key <- clusterKeys(clusters) # get core clusters
examineCounts(mat.key) # all algorithms agree
core <- returnCore(mat.key, agreement.thresh=50) # find 'core' cluster assignments
table(core) # the 'core' cluster sizes
result$measures # access validation measures
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.