Learn R Programming

shallot (version 0.4.9)

mass.algorithm: Mass Selection Algorithm

Description

This function selects the optimal mass value for Cluster Analysis via Random Partition distributions using the Ewens-Pitman attraction distribution.

Usage

mass.algorithm(mass, pc, vr, n, w = c(1, 1, 1), two.stage = TRUE)

Arguments

mass

a vector of mass values

pc

a vector of partition confidences for the partition estimates at the corresponding mass values

vr

a vector of variance ratios for the partition estimates at the corresponding mass values

n

a vector of the number of subsets in the partition estimates at the correpsonding mass values

w

a vector of length 3 specifying the weights of pc, vr, and n

two.stage

logical; if TRUE, the two stage algorithm is implemented

Value

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.

Details

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:

  1. 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:

  1. 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\).

  2. 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.

See Also

Other Default Mass Selection: default.mass(), partition.confidence(), variance.ratio()