classifyInterface {ClassifyR} | R Documentation |
More details of Poisson LDA are available in the documentation of Classify
.
## S4 method for signature 'matrix' classifyInterface(measurements, classes, test, ...) ## S4 method for signature 'DataFrame' classifyInterface(measurements, classes, test, ..., returnType = c("both", "class", "score"), verbose = 3) ## S4 method for signature 'MultiAssayExperiment' classifyInterface(measurements, test, targets = names(measurements), ...)
measurements |
Either a |
classes |
Either a vector of class labels of class |
test |
An object of the same class as |
targets |
If |
... |
Variables not used by the |
returnType |
Default: |
verbose |
Default: 3. A number between 0 and 3 for the amount of progress messages to give. This function only prints progress messages if the value is 3. |
Data tables which consist entirely of non-integer data cannot be analysed. If measurements
is an object of class MultiAssayExperiment
, the factor of sample classes must be stored
in the DataFrame accessible by the colData
function with column name "class"
.
Either a factor vector of predicted classes, a matrix of scores for each class, or a table of
both the class labels and class scores, depending on the setting of returnType
.
Dario Strbenac
if(require(PoiClaClu)) { readCounts <- CountDataSet(n = 100, p = 1000, 2, 5, 0.1) # Rows are for features, columns are for samples. trainData <- t(readCounts[['x']]) classes <- factor(paste("Class", readCounts[['y']])) testData <- t(readCounts[['xte']]) storage.mode(trainData) <- storage.mode(testData) <- "integer" classified <- classifyInterface(trainData, classes, testData) setNames(table(paste("Class", readCounts[["yte"]]) == classified), c("Incorrect", "Correct")) }