\name{hclustcompro}
\alias{hclustcompro}
\title{hclustcompro}
\usage{
hclustcompro(d, method = "complete", weight = NULL)
}
\description{
Compromised Hierarchical bottom-up clustering method.
The method uses at least two sources of information. The merging of the data sources is done by weigth that allows to weight each source.
Exemple for two sources: \deqn{D_\alpha = \alpha D_1 + (1-\alpha) D_2}\cr
}

\arguments{
  \item{d}{
a list of dissimilarity structure as produced by dist.
}
  \item{method}{
the agglomeration method to be used. This should be (an unambiguous abbreviation of) one of "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC).
}
  \item{weight}{
The parameter in order to generate a mixed matrix on which the classical hclust method is applied (same length as d). \cr Formula: \deqn{D_\alpha = w_1 D_1 + w_2 D_2 + ...}\cr where \eqn{w_1} is the first value of vector weight, \eqn{D_1} the first matrix of d and \eqn{D_\alpha} the mixed matrix used in hclust. Sum of weight must be 1.
}
}

\details{
\strong{CAH}\cr
Data fusion (parameter optimal value see \link[SPARTAAS]{hclustcompro_select_alpha}). It is necessary to define the appropriate proportion for each data source. This is the first sensitive point of the method that the user has to consider. A tool is provided to help him in his decision.

\strong{Cut dendrogram}\cr
The division into classes (see \link[SPARTAAS]{hclustcompro_cutree}) is the second crucial point. It has to be done based on the knowledge of the study area and some decision support tools such as the cluster silhouette or the calculation of the intra-cluster variability (WSS: Within Sum of Square).
}

\value{
See \link[stats:hclust]{stats::hclust} or \link[fastcluster:hclust]{fastcluster::hclust}
}

\author{
A. COULON

L. BELLANGER

P. HUSI
}

\examples{
data(datangkor)

#network stratigraphic data (Network)
network <- datangkor$stratigraphy

#contingency table
cont <- datangkor$contingency

#obtain the dissimilarities matrices
distance <- CAdist(cont, nPC = 11)
constraint <- adjacency(network)

#You can also run hclustcompro with the dist matrix directly
tree = hclustcompro(d = list(distance, constraint), weight = c(0.7, 0.3), method = "ward.D2")
cluster = hclustcompro_cutree(tree, k=5, reorder=TRUE, letter=TRUE)
}
