voteLabelTransfer: voteLabelTransfer

Description Usage Arguments Value Examples

View source: R/voteLabelTransfer.R

Description

A wrapper for doing either labelTransfer or labelTransferEllipse.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
voteLabelTransfer(
  type = "points",
  test.partition,
  test.cytometry,
  test.partition.ellipse,
  training.cytometries,
  training.cytometries.barycenter,
  test = 1,
  op.syst,
  cl.paral = 1,
  equal.weights = FALSE
)

Arguments

type

'points' indicates use of labelTransfer; 'ellipses' of labelTransferEllipse.

test.partition

Only when type = 'points'. Labels of a partition of the test data.

test.cytometry

Only when type = 'points'. Test data, a dataframe without labels.

test.partition.ellipse

Only when type = 'ellipses'. A test clustering viewed as a mixture of multivariate normal distributions.

training.cytometries

Only when type = 'points'. List of partitions, where each partition is a dataframe wher the last column contains the labels of the partition.

training.cytometries.barycenter

Only when type = 'ellipses'. A training partition viewed as a mixture of multivariate normal distributions.

test

Only when type = 'ellipses'. A dummy variable, should be any integral. Ment for use with lapply.

op.syst

Type of system, takes values in c('unix', 'windows').

cl.paral

Number of cores to be used in parallel procedures.

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.

Value

A list containing:

final.vote

A list for the votes on each cell.

complete.vote

A more complete list for the votes on each cell.

Examples

1
2
3
4
5
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))
voteLabelTransfer(test.partition = test.labels, test.cytometry = data.example[, 1:2],
                  training.cytometries = list(data.example), op.syst = .Platform$OS.type)$final.vote[[1]]

HristoInouzhe/optimalFlow documentation built on April 24, 2020, 4:31 a.m.