labelQC | R Documentation |
Returns the final label assignments the specified parameters
labelQC(
x,
model = c("svm", "rf", "gbm"),
type = c("all", "bead", "doublet", "debris", "dead"),
nTrain = 4000,
loss = c("auc", "class")
)
x |
A |
model |
Type of model to use to do the labeling. Options are "svm" for a support vector machine, "gbm" for a gradient boosting machine, or "rf" for a random forest. |
type |
Types of events to model. Options are "all", "bead", "doublet", "debris", and "dead". |
nTrain |
The (maximum) number of data points to use when training a model to predict event types. |
loss |
Specifies the type of loss used to tune the GBM. Can be either "auc" for the area under the curve or "class" for classification error. This argument is ignored if random forest is used as the model. |
labelQC
uses a support vector machine, gradient boosting machine,
or a random forest to compute the final labels
for the specified parameter types (bead, doublet, debris, or dead).
The predicted probabilities for all of the observations are stored in
the variable associated with that type for further analysis. Thus, it
is possible to have a probability greater than 0.5 for 'debris' but still
have a label of 'bead' if an observation was classified as a bead prior to
classifying the debris.
A SingleCellExperiment
data.frame is returned with the
labels for the parameters of listed in types
(bead, doublet, debris,
or dead) added to the label
variable and the probabilities for
each of the columns pertaining to the parameters listed in probs
.
data("raw_data", package = "CATALYST")
sce <- readCytof(raw_data, beads = "Beads", viability = c("cisPt1", "cisPt2"))
sce <- labelQC(sce)
table(label(sce))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.