prior_flowclust: Elicits data-driven priors from a flowSet object for...

View source: R/bayes-flowClust.R

prior_flowclustR Documentation

Elicits data-driven priors from a flowSet object for specified channels

Description

We elicit data-driven prior parameters from a flowSet object for specified channels. For each sample in the flowSet object, we apply the given prior_method to elicit the priors parameters.

Usage

prior_flowclust(
  flow_set,
  channels,
  prior_method = c("kmeans"),
  K = 2,
  nu0 = 4,
  w0 = c(10, 10),
  shrink = 1e-06,
  ...
)

Arguments

flow_set

a flowSet object

channels

a character vector containing the channels in the flowSet from which we elicit the prior parameters for the Student's t mixture

prior_method

the method to elicit the prior parameters

K

the number of mixture components to identify

nu0

prior degrees of freedom of the Student's t mixture components.

w0

the number of prior pseudocounts of the Student's t mixture components. (only the first element is used and the rest is ignored at the moment)

shrink

the amount of eigenvalue shrinkage to add in the case the prior covariance matrices are singular. See details.

...

Additional arguments passed to the prior elicitation method selected

Details

Currently, we have implemented only two methods. In the case that one channel is given, we use the kernel-density estimator (KDE) approach for each sample to obtain K peaks from which we elicit prior parameters. Otherwise, if more than one channel is specified, we apply K-Means to each of the samples in the flowSet and aggregate the clusters to elicit the prior parameters.

In the rare case that a prior covariance matrix is singular, we shrink the eigenvalues of the matrix slightly to ensure that it is positive definite. For instance, if the flow_set has two samples, this case can occur. The amount of shrinkage is controlled in shrink.

Value

list of the necessary prior parameters

Examples

## Not run: 
library(flowCore)
data(GvHD)
prior_flowclust(GvHD[1:3], c("FSC-H", "SSC-H"))

## End(Not run)

RGLab/openCyto documentation built on Nov. 7, 2024, 9:23 p.m.