View source: R/labelTransfer.R
labelTransfer | R Documentation |
Label transfer between a test partition and a training set of partitions.
labelTransfer(
training.cytometry,
test.cytometry,
test.partition,
equal.weights = FALSE
)
training.cytometry |
List of partitions, where each partition is a dataframe where the last column contains the labels of the partition. |
test.cytometry |
Test data, a dataframe without labels. |
test.partition |
Labels of a partition of the test data. |
equal.weights |
If True, weights assigned to every cluster in a partion are uniform (1/number of clusters) when calculating the similarity distance. If False, weights assigned to clusters are the proportions of points in every cluster compared to the total amount of points in the partition. |
A fuzzy relabeling consistent of a transportation plan.
data.example <- data.frame(v1 = c(rnorm(50, 2, 1), rnorm(50, -2, 1)),
v2 = c(rnorm(50, 2, 1), rnorm(50, -2, 1)), id = c(rep(0, 50), rep(1, 50)))
test.labels <- c(rep('a', 50), rep('b', 50))
labelTransfer(data.example, data.example[, 1:2], test.labels)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.