View source: R/main_wrappers.R
get_prior_weights | R Documentation |
This is the third step of the CLIMB procedure. It is useful because one can eliminate latent classes whose prior weights are too small. This function is parallelizable.
get_prior_weights(reduced_classes, fits, parallel = FALSE, ncores = 20, delta = NULL)
reduced_classes |
Matrix output from get_reduced_classes. |
fits |
Fits output from get_pairwise_fits. |
parallel |
Boolean. Should this function be parallelized? |
ncores |
If parallel=TRUE, how many cores should this be parallelized over? |
delta |
Which value of integer tuning parameters delta should be checked? Defaults to 0:choose(D,2) |
List of vectors. Each element of the list is a vector corresponds to the computed prior weights for a given value delta.
data(sim) data(fits) #------------------------------------------------------------ # Not run: # # D <- ncol(sim$data) # reduced_classes <- get_reduced_classes(fits, D, "lgf.txt") # prior_weights <- get_prior_weights(reduced_classes, fits, parallel = FALSE) # plot( # seq_along(prior_weights)-1, # sapply(prior_weights, function(X) # sum(X * n > D)), # ylab = "number of retained classes", # xlab = expression(delta)) #------------------------------------------------------------
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.