Description Usage Arguments Examples
View source: R/Diversity_gmm.R
This function calculates Hill diversity metrics from the mixtures calculated by PhenoGMM. D0 is calculated as Observed richness. D1 (exponential of Shannon entropy) and D2 (inverse Simpson index) are respectively Hill order 1 and 2. Errors for D0, D1 and D2 are calculated by bootstrapping.
1 | Diversity_gmm(gmm, R = 100, verbose = FALSE)
|
gmm |
list containing 1) contigency table and 2) the gmm model created by the PhenoGMM function |
R |
Number of bootstraps to conduct. Defaults to 100 |
verbose |
Progress of function is reported. Defaults to FALSE |
1 2 3 4 5 6 7 8 | data(flowData_transformed)
# Make model on training data
testGMM <- PhenoGMM(flowData_transformed[1:2], downsample = 1e3, nG = 128, param = c("FL1-H", "FL3-H"))
# Apply model to unseen/new data
testPred <- PhenoMaskGMM(flowData_transformed, gmm = testGMM)
# Calculate diversity for both contigency tables
Diversity_gmm(testGMM)
Diversity_gmm(testPred)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.