.prior_kmeans {openCyto} | R Documentation |
We elicit data-driven prior parameters from a flowSet
object for
specified channels. For each sample in the flowSet
object, we apply
kmeans
to obtain K
clusters. From each cluster, we determine its
centroid and the sample covariance matrix. We then aggregate these two sample
moments across all samples for each cluster.
.prior_kmeans(flow_set, channels, K, nu0 = 4, w0 = 10, nstart = 10, pct = 0.1, min = NULL, max = NULL, ...)
flow_set |
a |
channels |
a character vector containing the channels in the
|
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. |
nstart |
number of random starts used by |
pct |
percentage of randomly selected cells in each |
min |
a numeric vector that sets the lower bounds for data filtering. If
|
max |
a numeric vector that sets the upper bounds for data filtering. If
|
... |
Additional arguments passed to |
Because the cluster labels returned from kmeans
are arbitrary, we align
the clusters based on the centroids that are closest to a randomly selected
reference sample. We apply the Hungarian algorithm implemented using the
solve_LSAP
function from the clue
package to assist with the
alignment.
If each frame within flow_set
has a large number of cells, the
computational costs of kmeans
can be a burden. We provide the option
to randomly select pct
, a percentage of the cells from each flow frame
to which kmeans
is applied.
list of flowClust
prior parameters