This function selects the optimal mass value for Cluster Analysis via Random Partition distributions using the Ewens-Pitman attraction distribution.
mass.algorithm(mass, pc, vr, n, w = c(1, 1, 1), two.stage = TRUE)
a vector of mass values
a vector of partition confidences for the partition estimates at the corresponding mass values
a vector of variance ratios for the partition estimates at the corresponding mass values
a vector of the number of subsets in the partition estimates at the correpsonding mass values
a vector of length 3 specifying the weights of pc
, vr
,
and n
logical; if TRUE
, the two stage algorithm is
implemented
A matrix containing the `best' mass
value and corresponding
values for pc
, vr
, and n
. The matrix also contains the
mass values for the partitions estimate with more one more and one less
subset that the selected mass value.
The mass.algorithm
function is used internally in the
default.mass
function.
The default value for w
is c(1,1,1)
.
The general algorithm is as follows:
Rank the partition
confidence (pc
) and variance ratio (vr
). Select the
mass_i
value which minimizes the weigthed sum of \(w_1 pc_i + w_2
vr_i + w_3 n_i\).
The two stage algorithm proceeds as follows:
Rank the
partition confidence (pc
) and variance ratio (vr
). For each
number of clusters n
select the index which minimizes the weigthed sum
of \(w_1 pc_i + w_2 vr_i\).
Rerank the pc
and vr
of the
selected indices and select the mass_i
value which minimizes the
weigthed sum of \(w_1 pc_i + w_2 vr_i + w_3 n_i\) from among the selected
indices.
Other Default Mass Selection: default.mass
,
partition.confidence
,
variance.ratio