Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


salso (version 0.3.42)

chips: CHiPS Partition Greedy Search

Description

This function provides a partition to a subset of items which has high marginal probability based on samples from a partition distribution using the CHiPS greedy search method (Dahl, Page, Barrientos, 2024).

Usage

chips(
  x,
  threshold = 0,
  nRuns = 64,
  intermediateResults = TRUE,
  allCandidates = FALSE,
  nCores = 0
)

Value

If intermediateResults is FALSE, an integer vector giving the estimated subset partition, encoded using cluster labels with -1

indicating not allocated. If TRUE, a matrix with intermediate subset partitions in the rows.

Arguments

x

A B-by-n matrix, where each of the B rows represents a clustering of n items using cluster labels. For the bth clustering, items i and j are in the same cluster if x[b, i] == x[b, j].

threshold

The minimum marginal probability for the partial partition. Values closer to 1.0 will yield a partition of fewer items and values closer to 0.0 will yield a partition of more items.

nRuns

The number of runs to try, where the best result is returned.

intermediateResults

Should intermediate subset partitions be returned?

allCandidates

Should all the final subset partitions from multiple runs be returned?

nCores

The number of CPU cores to use, i.e., the number of simultaneous runs at any given time. A value of zero indicates to use all cores on the system.

Examples

Run this code
# For examples, use 'nCores = 1' per CRAN rules, but in practice omit this.
data(iris.clusterings)
draws <- iris.clusterings
chips(draws, threshold = 0, nRuns = 1)
chips(draws, nCores = 1)

Run the code above in your browser using DataLab