get_pairwise_fits: Fit all D choose 2 pairwise models to D-dimensional data

View source: R/main_wrappers.R

get_pairwise_fitsR Documentation

Fit all D choose 2 pairwise models to D-dimensional data

Description

This is the first step of the CLIMB procedure. It fits a penalized constrained normal mixture model to D-dimensional data, automatically selecting the number of clusters in each pairwise fit. This can be parallelized across up to D choose 2 cores.

Usage

get_pairwise_fits(z, nlambda = 10, parallel = TRUE, ncores = 10, bound = 0, flex_mu = FALSE)

Arguments

z

n by D matrix or data frame of appropriately pre-processed observations.

nlambda

Integer. Number of penalty terms to try

parallel

Boolean. Should the analysis be executed in parallel?

ncores

Integer. If parallel=TRUE, number of cores to parallelize over.

bound

Numeric. Is there a minimum value for the mean of the non-null distribution?

flex_mu

Logical. If true, relax constraints on mu.

Details

CLIMB automatically determines an optimal grid of lambdas, given a number of lambdas. In all analyses in the original CLIMB paper, bound was always set to 0.

Value

CLIMB returns a list of pairwise fits, each with a name in the style of "d1_d2", implying it is the pairwise fit between dimensions d1 and d2. Each fit contains 12 elements.

k

Number of clusters estimated to be present in the pairwise fit.

prop

Cluster mixing weights.

mu

Non-null cluster mean.

sigma

Non-null cluster standard deviation.

rho

Correlation between replicates with association.

df

Degrees of freedom for each cluster.

cluster

Cluster labels for each of the n observations.

BIC

BIC of optimal fit.

lambda

Lambda of optimal fit.

ll

Log likelihood of the data given the optimal fit.

post_prob

Posterior probability of each observation arising from each cluster.

combos

Used internally with fconstr_pGMCM. Can be ignored by the user.

Author(s)

hbk5086@psu.edu

Examples

data(sim)
#------------------------------------------------------------
# Not run:
#
# fits <- get_pairwise_fits(z = sim$data, parallel = FALSE)
# plot(sim$data[,1:2], col = fits[[1]]$cluster)
#------------------------------------------------------------

hillarykoch/CLIMB documentation built on Oct. 24, 2022, 4:27 a.m.