2.1. Notation and Some Basic Concepts
In the
Section 2.1, we introduce the notation and fundamental definitions adopted throughout the study.
: denote the numbers of individuals, variables, and clusters, respectively;
: index set of individuals;
: observed data matrix;
: pairwise dissimilarity matrix.
Definition 1. A dissimilarity matrix, denoted by for , is a symmetric square matrix of size that encodes the pairwise dissimilarity between observations in a dataset. Each entry is non-negative, i.e., , and the diagonal elements are zero, such that for all i [11]. Definition 2. A distance matrix is a particular case of a dissimilarity matrix in which the entries correspond to geometric distances between observations. It is a symmetric matrix, i.e., , with non-negative elements and zero diagonal entries . In addition, it satisfies the triangle inequality, meaning that for all [11]. Definition 3. A consensus matrix, denoted by for , is a symmetric matrix of size whose entries lie within the interval . The diagonal elements are equal to one, i.e., , while each off-diagonal element quantifies how frequently individuals i and j are assigned to the same cluster over repeated resampling iterations [12]. The following example illustrates how the consensus matrix is constructed. Consider a simple case with individuals and subsampling iterations. Suppose the cluster assignments are:
Iteration 1: and ;
Iteration 2: and ;
Iteration 3: and ;
Iteration 4: and .
The consensus value indicates how often individuals i and j are grouped within the same cluster across different iterations. For example, individuals 1 and 2 appear together in three out of four iterations, giving , whereas individuals 1 and 4 never appear in the same cluster, yielding .
The resulting consensus matrix is
Definition 4. Consider two observations and , each characterized by p variables that can belong to different data types. The Gower similarity coefficient between and , denoted by , is given bywhere measures the similarity between and with respect to the k-th variable, and indicates whether that variable is valid and non-missing for both observations. The associated Gower dissimilarity [6] is then defined as 2.2. Some Methods of Clustering
Cluster analysis seeks to partition observations into groups according to their degree of similarity. The objective is to obtain clusters in which members of the same group are closely related, whereas elements from different groups are distinctly separated. Most clustering methods are based on distance or similarity metrics, typically combined with criteria that encourage intra-cluster compactness and inter-cluster separation.
Clustering approaches can be broadly divided into five main categories.
- 1.
Hierarchical Clustering
Hierarchical clustering [
13] arranges observations into a nested structure, typically visualized as a dendrogram, which illustrates the relationships among clusters at different levels [
14]. Hierarchical clustering procedures are generally divided into agglomerative methods, which iteratively merge clusters, and divisive methods, which recursively partition them [
15].
- 2.
Partition-Based Clustering
Partitioning methods aim to split a finite dataset
into
K mutually exclusive and non-empty subsets
, where each
[
16,
17]. The number of clusters
K can either be specified in advance or inferred from the underlying data structure.
Most methods in this category can be expressed as the optimization of a global objective function:
where
represents the prototype (cluster center) associated with cluster
, and
denotes a suitable loss function. Typical examples of partition-based methods include K-means, K-medians, K-modes, and K-medoids.
K-means. The K-means algorithm [
18] partitions the dataset into
K clusters by repeatedly assigning each observation to its nearest centroid. It seeks to minimize the within-cluster sum of squared distances (WCSS) [
19].
K-medians. The K-medians method [
20] replaces the mean with the geometric median [
21] and minimizes the sum of
distances:
This formulation provides increased robustness to outliers [
22].
K-modes. The K-modes algorithm [
23] adapts the K-means approach to categorical data by substituting cluster means with modes and employing appropriate dissimilarity measures, such as the Hamming distance [
24].
K-medoids. The K-medoids algorithm [
25] characterizes each cluster using a representative observation, referred to as a medoid, and aims to reduce the overall dissimilarity between data points and their closest medoid [
26]. This method is particularly useful when Euclidean distance assumptions are not suitable.
Partitioning Around Medoids (PAM). Partitioning Around Medoids (PAM) [
25] is a widely used approach for solving the K-medoids clustering problem.
In contrast to centroid-based methods such as K-means, PAM determines cluster centers using actual observations (medoids).
Starting from a dissimilarity matrix
, the objective is to identify a set of
K medoids
that minimizes the total dissimilarity between each observation and its nearest medoid:
The medoids are iteratively refined by exchanging candidate points with current medoids whenever such swaps decrease the objective function. Because PAM relies solely on pairwise dissimilarities rather than Euclidean structure, it can be naturally extended to mixed-type data using measures such as the Gower coefficient.
K-prototypes. The K-prototypes algorithm [
27] is designed for clustering data that include both numerical and categorical variables, combining ideas from K-means and K-modes. It uses Euclidean distance for numerical variables and a matching-based dissimilarity for categorical ones.
Let
denote the numeric and categorical components of observation
i. The clustering objective is defined as
where
is the cluster assignment indicator,
denotes the prototype of cluster
k,
measures categorical mismatches, and
is a weighting parameter controlling the relative influence of categorical attributes.
This hybrid distance formulation allows K-prototypes to handle mixed-type datasets efficiently while maintaining a partition-based clustering structure.
In this study, PAM and K-prototypes were employed as baseline partitioning algorithms to evaluate the clustering structure produced by the proposed hierarchical consensus framework.
- 3.
Density-Based Clustering
Density-based clustering characterizes clusters as regions of high data concentration, while areas with low density are treated as noise [
28].
The DBSCAN algorithm [
29] can identify clusters of arbitrary shape without requiring the number of clusters to be specified in advance [
30].
- 4.
Model-Based Clustering
Model-based clustering formulates the clustering task as fitting a finite mixture of probabilistic distributions to the observed data [
31].
Formally, the data distribution can be written as
where
denotes the mixing weight of component
k (
),
corresponds to the density associated with the
k-th component, and
represents the set of model parameters [
32].
Cluster assignments are derived from posterior probabilities
obtained via Bayes’ theorem. Model parameters are commonly estimated using the Expectation–Maximization (EM) algorithm [
33].
- 5.
Uncertainty-Based Clustering (Neutrosophic Clustering)
Uncertainty-based clustering generalizes fuzzy clustering by explicitly incorporating indeterminacy into the representation of data. In the neutrosophic framework, each observation is described by a triplet
, which quantifies the degrees of truth-membership, indeterminacy, and falsity, respectively [
34].
Consider a dataset comprising N observations, and assume the presence of K clusters with corresponding centroids .
For a given observation , its neutrosophic representation is defined through three components:
quantifies the degree of membership of ;
captures the level of indeterminacy;
measures the degree of non-membership (falsity).
The components of the neutrosophic triplet are computed using distance-based formulations commonly adopted in neutrosophic clustering models [
35,
36]. In the classical neutrosophic framework, the triplet is defined for each observation as
.
The truth-membership degree
is defined as
where
denotes the distance between observation
and cluster centroid
, and
is the fuzzification parameter.
The indeterminacy term
reflects the uncertainty in assigning
to a particular cluster and is derived from the relative distances to its two closest cluster centers:
where
and
denote the distances to the closest and second-closest cluster centroids, respectively. Larger values of
indicate observations located near cluster boundaries.
The falsity component represents the degree of non-membership and is defined independently as
where
is a small constant to avoid numerical instability. This formulation ensures that
is not directly dependent on
, in accordance with the classical neutrosophic framework.
The corresponding objective function is defined as
where
corresponds to the distance between
and centroid
,
determines the degree of fuzziness, and
acts as a regularization term [
35].
Cluster centers are updated as
Neutrosophic clustering has shown strong performance in applications such as image segmentation [
37] and medical diagnosis [
38], particularly in noisy or uncertain environments due to its explicit modeling of indeterminacy.
Within the context of consensus clustering, the neutrosophic triplet can be naturally related to the consensus matrix used in the present study. Let denote the classical consensus value representing the proportion of resampling runs in which observations i and j are clustered together. A neutrosophic representation of this relationship can be expressed as (stable co-clustering), (separation), and an indeterminacy component that captures ambiguous assignments, which are typically observed when takes intermediate values.
For example, if two observations are clustered together in of the resampling runs (), the pair shows strong stability with low ambiguity. In contrast, a value close to 0.5 indicates high indeterminacy and suggests that the pair lies near a cluster boundary. In a hierarchical framework, such indeterminacy information could be used to identify unstable branches or guide pruning decisions in the consensus tree.
2.3. Methods of Analysis
2.3.1. Hierarchical Clustering
Hierarchical clustering is generally approached through either an agglomerative or a divisive scheme. In the agglomerative case, the procedure starts with each observation forming its own cluster and proceeds by successively combining clusters based on their proximity. At each stage, the closest pair of clusters is merged according to a chosen linkage rule, which defines how inter-cluster distances or similarities are computed.
Under the single linkage criterion, the distance between two clusters is determined by the smallest distance between any two observations belonging to different clusters. Consequently, clusters are merged whenever a pair of observations (each from a different cluster) exhibits the minimum separation.
Let
denote a collection of
K clusters, where
represents the number of observations in cluster
, for
:
where
represents the distance between observations
and
. While Euclidean distance is often adopted in this context, the present study utilizes the Gower distance to accommodate mixed-type data. The merging procedure continues until all observations are combined into a single cluster [
39].
Complete linkage, also known as the farthest-neighbor criterion, evaluates the distance between two clusters by considering the largest distance between any pair of observations drawn from the two clusters [
40].
Average linkage computes the distance between two clusters as the mean of all pairwise distances between observations drawn from each cluster. The distance between clusters
and
is given by
The Ward.D2 linkage measures the increase in within-cluster sum of squares (SSE) resulting from merging two clusters. Suppose
is the cluster formed by merging clusters
and
. Then
The Ward.D2 method selects the pair of clusters whose merger leads to the smallest increase in the total within-cluster variance, which can be expressed as
Although the Ward.D2 criterion is originally defined in Euclidean space, in this study it is applied to the Gower dissimilarity matrix, which allows hierarchical clustering to be extended to mixed-type customer data.
In contrast, divisive hierarchical clustering begins with all observations assigned to a single cluster and progressively partitions the data into smaller groups. At each step, one cluster is split into two sub-clusters according to a given partitioning criterion [
41]. This approach typically follows two strategies: monothetic and polythetic. In the monothetic case, the split is performed based on a single variable, whereas the polythetic approach considers all
J variables simultaneously. Methods such as decision trees are commonly associated with monothetic procedures, while techniques like PCA and K-means belong to a broader class of polythetic divisive methods.
Cluster quality can be further evaluated using the silhouette coefficient, which measures how well each observation is assigned to its cluster in comparison with neighboring clusters [
42].
2.3.2. Consensus-Based Hierarchical Trees
Consensus trees are rule-based aggregation methods designed to combine multiple hierarchical structures into a single representative tree. Clusters that occur in the majority of the input trees are retained according to the classical majority-rule criterion [
10,
43,
44].
However, in the present study we adopt a pairwise co-clustering formulation, where consensus is defined through stability frequencies between pairs of individuals rather than through majority selection of cluster sets.
Let denote a dataset of n observations, and be a collection of rooted hierarchical trees obtained from B subsampling iterations, where each tree is constructed on a subsample .
Each tree
can be described by its set of distinct non-trivial clusters,
, which define mutually compatible groupings. In particular, for any two clusters
, either
,
, or
[
45].
In practice, consensus analysis quantifies how often pairs of observations are assigned to the same cluster across repeated subsampling iterations. Let denote the set of clusters obtained at iteration b, where k is the number of clusters extracted at each iteration.
The next step in constructing a consensus tree is to compute a consensus matrix
M. Each entry
corresponds to the empirical frequency with which observations
i and
j are assigned to the same cluster when they co-occur in subsampled datasets [
1,
46,
47]. Specifically,
where
is defined as
and
is an indicator that equals 1 if both individuals are present in resampled data
.
Once the consensus matrix is built, we transform it into a dissimilarity matrix using . Hierarchical clustering is subsequently applied to this dissimilarity matrix to construct a consensus hierarchical tree, capturing the co-clustering patterns observed across subsampling iterations.
2.3.3. Cluster Validation Criteria
To determine the optimal number of clusters and evaluate clustering performance, several complementary validation criteria are employed.
Davies–Bouldin Index (DBI). The Davies–Bouldin Index evaluates clustering performance by measuring the similarity between each cluster and its most similar counterpart. For a partition consisting of
K clusters, the index is defined as
where
represents the within-cluster dispersion of cluster
k, and
denotes the distance between the centroids of clusters
k and
. Lower DBI values indicate improved cluster separation and greater compactness [
48].
Silhouette Score. The silhouette coefficient measures how well an observation fits within its assigned cluster in comparison to neighboring clusters. For a given observation
i, it is computed as
where
corresponds to the average dissimilarity between observation
i and all other points in the same cluster, while
denotes the minimum average dissimilarity between
i and points in alternative clusters. The resulting values lie within the interval
, with higher values indicating a better assignment of observations to clusters [
49].
Consensus CDF and Delta Area. Within consensus clustering, the cumulative distribution function (CDF) of consensus values summarizes how stable pairwise co-clustering probabilities are across resampling iterations. The change in the area under the CDF curve between successive values of
K, known as the Delta Area, provides an indication of how clustering stability evolves as the number of clusters increases [
1].
Proportion of Ambiguous Clustering (PAC). To further assess clustering stability, we compute the Proportion of Ambiguous Clustering (PAC), a metric widely adopted in the consensus clustering literature [
1].
Let denote the consensus matrix, where each entry corresponds to the proportion of resampling iterations in which individuals i and j are grouped in the same cluster.
For fixed lower and upper thresholds
, the PAC index can be expressed as
Here, denotes the total number of distinct unordered pairs of individuals, and represents set cardinality.
In this study, we use the commonly adopted interval
. Lower PAC values indicate that consensus values are concentrated near 0 and 1, which corresponds to stronger clustering stability [
50,
51].