View source: R/sequence-distances-clustering.R
| bootstrap_sequence_clusters | R Documentation |
Uses repeated subsampling without replacement and records pairwise co-clustering agreement relative to the full-data solution.
bootstrap_sequence_clusters(
distance,
k,
method = c("hierarchical", "pam", "clara"),
n_boot = 100L,
sample_fraction = 0.8,
seed = 1L,
linkage = "average",
...
)
distance |
Sequence distance object. |
k |
Number of clusters. |
method |
Clustering method. |
n_boot |
Number of subsamples. |
sample_fraction |
Fraction of sequences sampled in each iteration. |
seed |
Reproducibility seed. |
linkage |
Hierarchical linkage. |
... |
Additional clustering arguments. |
An object of class gp3_sequence_cluster_bootstrap.
sequences <- data.frame(
sequence_id = rep(c("s1", "s2", "s3", "s4"), each = 4L),
sequence_order = rep(1:4, times = 4L),
state = c("A", "B", "C", "D", "A", "B", "C", "C",
"D", "C", "B", "A", "D", "C", "A", "A"),
group = rep(c("g1", "g2"), each = 8L),
stringsAsFactors = FALSE
)
distance <- compute_sequence_distance(sequences)
bootstrap_sequence_clusters(distance, k = 2L, n_boot = 5L, seed = 1L)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.