register_clustering_methods | R Documentation |
Configure clustering methods
register_clustering_methods(...)
all_clustering_methods()
remove_clustering_methods(method)
reset_clustering_methods()
... |
A named list of clustering functions, see in Details. |
method |
A vector of method names. |
The user-defined functions should accept at least one argument which is the input matrix.
The second optional argument should always be ...
so that parameters
for the clustering function can be passed by the control
argument from cluster_terms()
, simplifyGO()
or simplifyEnrichment()
.
If users forget to add ...
, it is added internally.
Please note, the user-defined function should automatically identify the optimized number of clusters.
The function should return a vector of cluster labels. Internally it is converted to numeric labels.
The default clustering methods are:
kmeans
see cluster_by_kmeans()
.
dynamicTreeCut
see cluster_by_dynamicTreeCut()
.
mclust
see cluster_by_mclust()
.
apcluster
see cluster_by_apcluster()
.
hdbscan
see cluster_by_hdbscan()
.
fast_greedy
see cluster_by_fast_greedy()
.
louvain
see cluster_by_louvain()
.
walktrap
see cluster_by_walktrap()
.
MCL
see cluster_by_MCL()
.
binary_cut
see binary_cut()
.
all_clustering_methods()
returns a vector of clustering method names.
register_clustering_methods(
# assume there are 5 groups
random = function(mat, ...) sample(5, nrow(mat), replace = TRUE)
)
all_clustering_methods()
remove_clustering_methods("random")
all_clustering_methods()
remove_clustering_methods(c("kmeans", "mclust"))
all_clustering_methods()
reset_clustering_methods()
all_clustering_methods()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.