Skip to contents

This function calculates the Proportion of Ambiguous Clustering (PAC) to help evaluate the optimal number of clusters in a consensus clustering analysis.

Usage

CalPAC(consensus_result, range_clusters = 2:6, x1 = 0.1, x2 = 0.9)

Arguments

consensus_result

A list containing consensus clustering results from ConsensusClusterPlus.

range_clusters

Integer vector. The range of cluster numbers evaluated during consensus clustering.

x1

Numeric. Lower bound for defining the PAC (default: 0.1).

x2

Numeric. Upper bound for defining the PAC (default: 0.9).

Value

A data frame containing the PAC values for each number of clusters.

Details

The PAC is calculated as the difference between the cumulative distribution function values at two thresholds, x2 and x1, on the consensus matrix values. A lower PAC indicates a more stable clustering solution.

Author

Zaoqu Liu; Email: liuzaoqu@163.com

Examples

data <- mtcars
cc_res <- RunCC(data)
pac_values <- CalPAC(cc_res)
pac_values