"mixModelsTrain"(expression, classes, ...) "mixModelsTrain"(expression, ..., verbose = 3) "mixModelsTest"(models, test, ...) "mixModelsTest"(models, test, weighted = c("both", "unweighted", "weighted"), weight = c("all", "height difference", "crossover distance", "sum differences"), densityXvalues = 1024, minDifference = 0, returnType = c("label", "score", "both"), verbose = 3)
matrix
or ExpressionSet
containing
the training data. For a matrix, the rows are features, and the columns
are samples.matrix
or ExpressionSet
containing
the test data. For a matrix, the rows are features, and the columns
are samples."height difference"
, the weight of
each prediction is equal to the sum of the verical distances for all of the
mixture components within one class subtracted from the sum of the components of
the other class, summed for each value of x. For "crossover distance"
,
the x positions where two mixture densities cross is firstly calculated.
The predicted class is the class with the highest mixture sum at the
particular value of x and the weight is the distance of x from the
nearest density crossover point.weight
is "crossover distance"
. The number of
equally-spaced locations at which to calculate y values for each mixture density.matrix
dispatch,
arguments passed to the function with ExpressionSet
dispatch.
For the training function with ExpressionSet
dispatch,
extra arguments passed to mixmodCluster
. The argument nbCluster
is mandatory."label"
, "score"
, or "both"
. Sets the return value
from the prediction to either a vector of class labels, score for a sample belonging
to the second class, as determined by the factor levels, or both labels and scores
in a data.frame
.mixModelsTrain
, a list of trained models of class MixmodCluster
.
A vector or list of class prediction information, as long as the number of samples in the test data,
or lists of such information, if both weighted and unweighted voting or a range of minDifference
values was provided.
weighted
is TRUE
, then a sample's predicted class is the class with
the largest sum of weights, scaled for the number of samples in
the training data of each class. Otherwise, when weighted
is FALSE
,
each feature has an equal vote, and votes for the class with the largest weight, scaled for
class sizes in the training set. If weight
is "crossover distance"
, the crossover points are computed by considering the
distance between y values of the two densities at every x value. x values for which the sign of the difference
changes compared to the difference of the closest lower value of x are used as the crossover points.
Setting weight to "sum differences"
is intended to find a mix of features which are strongly
differentially expressed and differentially variable.
# First 25 samples are mixtures of two normals. Last 25 samples are one normal.
genesMatrix <- sapply(1:25, function(geneColumn) c(rnorm(50, 5, 1), rnorm(50, 15, 1)))
genesMatrix <- cbind(genesMatrix, sapply(1:25, function(geneColumn) rnorm(100, 9, 3)))
classes <- factor(rep(c("Poor", "Good"), each = 25))
trained <- mixModelsTrain(genesMatrix, classes, nbCluster = 1:3)
mixModelsTest(trained, genesMatrix, minDifference = 1:3)
Run the code above in your browser using DataLab