Diversity_gmm: Unsupervised calculation of phenotypic diversity on gaussian...

Description Usage Arguments Examples

View source: R/Diversity_gmm.R

Description

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.

Usage

1
Diversity_gmm(gmm, R = 100, verbose = FALSE)

Arguments

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

Examples

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)

rprops/Phenoflow_package documentation built on Sept. 22, 2020, 5:43 p.m.