nearestShrunkenCentroidSelectionInterface: Interface for 'pamr.listgenes' Function from 'pamr' CRAN...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Restructures variables from ClassifyR framework to be compatible with pamr.listgenes definition.

Usage

1
2
3
4
5
  ## S4 method for signature 'matrix'
nearestShrunkenCentroidSelectionInterface(expression, classes, ...)
  ## S4 method for signature 'ExpressionSet'
nearestShrunkenCentroidSelectionInterface(expression, datasetName, trained, ...,
                                                       selectionName = "Shrunken Centroids", verbose = 3)

Arguments

expression

Either a matrix or ExpressionSet containing the training data. For a matrix, the rows are features, and the columns are samples.

datasetName

A name for the dataset used. Stored in the result.

classes

A vector of class labels.

trained

The output of nearestShrunkenCentroidTrainInterface, which is identical to the output of pamr.listgenes.

...

Extra arguments passed to pamr.listgenes or parameters not used by the matrix method that are passed to the ExpressionSet method.

selectionName

A name to identify this selection method by. Stored in the result.

verbose

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.

Details

This function is an interface between the ClassifyR framework and pamr.listgenes.

The set of features chosen is the obtained by considering the range of thresholds provided to nearestShrunkenCentroidTrainInterface and using the threshold that obtains the lowest cross-validation error rate on the training set.

Value

An object of class SelectResult. The rankedFeatures slot will be empty.

Author(s)

Dario Strbenac

See Also

pamr.listgenes for the function that was interfaced to.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  if(require(pamr))
  {
    # Genes 76 to 100 have differential expression.
    genesMatrix <- sapply(1:25, function(geneColumn) c(rnorm(100, 9, 1)))
    genesMatrix <- cbind(genesMatrix, sapply(1:25, function(geneColumn)
                                 c(rnorm(75, 9, 1), rnorm(25, 14, 1))))
    classes <- factor(rep(c("Poor", "Good"), each = 25))
    
    trained <- nearestShrunkenCentroidTrainInterface(genesMatrix, classes)
    nearestShrunkenCentroidSelectionInterface(genesMatrix, classes, "Example", trained)
  }

ClassifyR documentation built on Nov. 17, 2017, 1:42 p.m.