Description Usage Arguments Value Examples
View source: R/tailor_methods.R
Takes as input a tailor object and some data (could be the data used to learn the tailor object, or some new data). Computes, for each event, the mixture component from which it is most likely drawn, then maps this mixture component to its corresponding categorical cluster.
1 2 3 4 5 6 7 | tailor_predict(
data,
tailor_obj,
n_batch = 64,
parallel = FALSE,
verbose = FALSE
)
|
data |
A flowSet, flowFrame or a matrix containing events along the rows, markers along columns. |
tailor_obj |
A tailor object containing information about mixture components and categorical clusters. Can be obtained as the output of tailor.learn. |
n_batch |
A naive implementation would need nrow(data)*mixture_components memory. To reduce memory usage, process data in batches. |
parallel |
Boolean flag; if true, uses multithreading to process batches in parallel. For optimal runtime, if parallel = TRUE, n_batch should be a multiple of the number of cores available, as returned by parallel::detectCores(). |
verbose |
Boolean flag; if true, outputs timing and milestone information. |
Two atomic vectors of integers, one giving the mixture component, and the other the categorical cluster, for each event.
1 2 3 4 5 6 7 8 | fileName <- system.file("extdata", "sampled_flowset_old.rda",
package = "Tailor")
load(fileName)
tailor_params <- flowCore::colnames(fs_old)[c(7:9, 11:22)]
tailor_obj <- tailor_learn(data = fs_old,
params = tailor_params,
mixture_components = 50)
tailor_pred <- tailor_predict(fs_old, tailor_obj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.