% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sequence-distances-clustering.R
\name{create_sequence_cluster_ensemble}
\alias{create_sequence_cluster_ensemble}
\title{Create a sequence-cluster ensemble}
\usage{
create_sequence_cluster_ensemble(..., k, linkage = "average")
}
\arguments{
\item{...}{Two or more \code{gp3_sequence_clustering} objects or named assignment
vectors.}

\item{k}{Number of consensus clusters.}

\item{linkage}{Hierarchical linkage applied to the co-association distance.}
}
\value{
An object of class \code{gp3_sequence_cluster_ensemble} containing the
consensus assignments, co-association matrix, model, and source solutions.
}
\description{
Combines multiple named cluster assignments through a co-association matrix
and applies hierarchical clustering to \code{1 - co-association}.
}
\examples{
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
)
d1 <- compute_sequence_distance(sequences, method = "lcs")
d2 <- compute_sequence_distance(sequences, method = "transition")
create_sequence_cluster_ensemble(cluster_sequences(d1, 2L),
                                 cluster_sequences(d2, 2L), k = 2L)

}
