View source: R/main_wrappers.R
get_pairwise_fits | R Documentation |
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.
get_pairwise_fits(z, nlambda = 10, parallel = TRUE, ncores = 10, bound = 0, flex_mu = FALSE)
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. |
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.
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. |
data(sim) #------------------------------------------------------------ # Not run: # # fits <- get_pairwise_fits(z = sim$data, parallel = FALSE) # plot(sim$data[,1:2], col = fits[[1]]$cluster) #------------------------------------------------------------
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.