choose_clusters: Filter clusters heuristic

View source: R/choose_clusters.R

choose_clustersR Documentation

Filter clusters heuristic

Description

This removes the clusters from a fit object. There are 2 conditions that can be used to filter out clusters: 1) the cluster size (mixing proportion), which one can require to be above a certain cutoff, and 2) the Binomial peak, whichi one can ask to be above a certain value in at least a certain number of dimensions. Output clusters will be renamed by size (C1 will be larger etc.), and the latent variables and hard clustering assignments will be updated accordingly.

Usage

choose_clusters(
  x,
  binomial_cutoff = 0.05,
  dimensions_cutoff = 1,
  pi_cutoff = 0.02,
  re_assign = FALSE
)

Arguments

x

An object of class 'vb_bmm'.

binomial_cutoff

Minimum Binomial success probability.

dimensions_cutoff

Minimum number of dimensions where we want to detect a Binomial component.

pi_cutoff

Minimum size of the mixture component.

re_assign

If TRUE, point assigned to a cluster that is filtered our, are re-assigned from the density function (without updating the parameters). Otherwise, clustering assignments for those points are returned as NA.

Value

An object of class 'vb_bmm'.

Examples

data(fit_mvbmm_example)
choose_clusters(fit_mvbmm_example)

caravagn/VIBER documentation built on July 16, 2022, 1:23 a.m.