pairsDifferencesSelection: Selection of Pairs of Features that are Different Between...

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

Description

Ranks pre-specified pairs of features by the largest difference of the sum of measurement differences over all samples within a class and chooses the pairs of features which have the best resubstitution performance.

Usage

1
2
3
4
5
6
7
8
  ## S4 method for signature 'matrix'
pairsDifferencesSelection(measurements, classes, featurePairs = NULL, ...)
  ## S4 method for signature 'DataFrame'
pairsDifferencesSelection(measurements, classes, featurePairs = NULL,
                  datasetName, trainParams, predictParams, resubstituteParams,
                  selectionName = "Pairs Differences", verbose = 3)
  ## S4 method for signature 'MultiAssayExperiment'
pairsDifferencesSelection(measurements, target = names(measurements)[1], featurePairs = NULL, ...)

Arguments

measurements

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

classes

Either a vector of class labels of class factor of the same length as the number of samples in measurements or if the measurements are of class DataFrame a character vector of length 1 containing the column name in measurement is also permitted. Not used if measurements is a MultiAssayExperiment object.

featurePairs

An S4 object of type Pairs containing feature identifiers to calculate the sum of differences within each class for.

target

If measurements is a MultiAssayExperiment, the name of the data table to be used.

...

Variables not used by the matrix nor the MultiAssayExperiment method which are passed into and used by the DataFrame method.

datasetName

A name for the data set used. Stored in the result.

trainParams

A container of class TrainParams describing the classifier to use for training.

predictParams

A container of class PredictParams describing how prediction is to be done.

resubstituteParams

An object of class ResubstituteParams describing the performance measure to consider and the numbers of top features to try for resubstitution classification.

selectionName

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

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.

Details

Instead of considering whether one feature in a pair of features is consistently lower or higher than the other in the pair, this method takes the sum of differences across all samples within a class, to prevent ties in the ranking of pairs of features.

Value

An object of class SelectResult or a list of such objects, if the classifier which was used for determining the specified performance metric made a number of prediction varieties.

Author(s)

Dario Strbenac

References

Simple decision rules for classifying human cancers from gene expression profiles, Aik C Tan, Daniel Q Naiman, Lei Xu, Raimond L. Winslow and Donald Geman, 2005, Bioinformatics, Volume 21 Issue 20, https://academic.oup.com/bioinformatics/article/21/20/3896/203010.

See Also

kTSPclassifier for a classifier which makes use of the pairs of selected features in classification.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  featurePairs <- Pairs(c('A', 'A'), c('B', 'C'))
                           
  # Difference in differences for features A and C between classes.                                           
  measurements <- matrix(c(9.9, 10.5, 10.1, 10.9, 11.0, 6.6, 7.7, 7.0, 8.1, 6.5,
                           8.5, 10.5, 12.5, 10.5, 9.5, 8.5, 10.5, 12.5, 10.5, 9.5,
                           6.6, 7.7, 7.0, 8.1, 6.5, 11.2, 11.0, 11.1, 11.4, 12.0,
                           8.1, 10.6, 7.4, 7.1, 10.4, 6.1, 7.3, 2.7, 11.0, 9.1,
                           round(rnorm(60, 8, 1), 1)), ncol = 10, byrow = TRUE)
  classes <- factor(rep(c("Good", "Poor"), each = 5))
                         
  rownames(measurements) <- LETTERS[1:10]
  colnames(measurements) <- names(classes) <- paste("Patient", 1:10)

  # The features are pairs and there are only two in this example.
  resubstituteParams <- ResubstituteParams(nFeatures = 1:2,
                                performanceType = "balanced error", better = "lower")
  
  predictParams <- PredictParams(NULL)
  pairsDifferencesSelection(measurements, classes, featurePairs = featurePairs,
                            datasetName = "Example",
                            trainParams = TrainParams(kTSPclassifier),
                            predictParams = predictParams,
                            resubstituteParams = resubstituteParams)

ClassifyR documentation built on Nov. 8, 2020, 6:53 p.m.