Factory function for creating param classes extending bluster::BlusterParam to be used with clusterData(). These param classes define the clustering operation to be performed and also contain relevant parameters in an easily accessible format.

clusterParam(method, ...)

Arguments

method

character. Parameter class to generate

...

additional params to pass to the param class creator.

bluster params (works on matrix-like data)

  • "kmeans" - K-means clustering

  • "affinity" - Affinity propagation (needs apcluster)

  • "som" - Self-organizing maps (needs kohonen)

  • "agnes" - Agglomerative nesting

  • "diana" - Divisive analysis clustering

  • "hclust" - Hierarchical clustering

  • "dbscan" - Density-based clustering with DBSCAN

  • "dmm" - Dirichlet multinomial mixture clustering (needs DirichletMultinomial)

  • "twostep" - Two step clustering with vector quantization

  • "clara" - Clustering large applications (pam for large datasets)

  • "mbkmeans" - Mini-batch k-means clustering (needs mbkmeans)

  • "pam" - Partitioning around medoids

giotto-specific (works on networks)

See also

Examples

x <- clusterParam("kmeans", centers = 2)
x@centers
#> [1] 2

m <- matrix(runif(9), nrow = 3)
clusterData(m, x)
#>    cluster
#>     <fctr>
#> 1:       2
#> 2:       1
#> 3:       2
# add ids
rownames(m) <- paste("id", seq_len(3), sep = "_")
clusterData(m, x)
#>    cell_ID cluster
#>     <char>  <fctr>
#> 1:    id_1       2
#> 2:    id_2       1
#> 3:    id_3       2