subSet: Subset a data matrix or expression set

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

View source: R/FMradio.R

Description

subSet is a convenience function that subsets a data matrix or an ExpressionSet object.

Usage

1
subSet(X, Rf)

Arguments

X

A data matrix or an ExpressionSet object.

Rf

A filtered (correlation) matrix (as returned by the RF function).

Details

The subSet convenience function may directly follow usage of the RF in the sense that the latters return-value can be used as the Rf argument. It then subsets a data matrix or an ExpressionSet object to those features retained by the redundancy-filtering. The function returns a subsetted matrix or ExpressionSet (depending on the class of the X argument). The subsetted data can then be used for penalty-parameter selection and regularized correlation matrix estimation provided by the regcor function.

Value

Returns a subsetted data matrix or ExpressionSet.

Note

If argument X is a matrix, the observations are expected to be in the rows and the features are expected to be in the columns.

Author(s)

Carel F.W. Peeters <cf.peeters@vumc.nl>

References

Peeters, C.F.W. et al. (2019). Stable prediction with radiomics data. arXiv:1903.11696 [stat.ML].

See Also

regcor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Generate some (high-dimensional) data
## Get correlation matrix
p = 25
n = 10
set.seed(333)
X = matrix(rnorm(n*p), nrow = n, ncol = p)
colnames(X)[1:25] = letters[1:25]
R <- cor(X)

## Redundancy visualization, at threshold value .9
radioHeat(R, diag = FALSE, threshold = TRUE, threshvalue = .9)

## Redundancy-filtering of correlation matrix
Rfilter <- RF(R, t = .9)
dim(Rfilter)

## Subsetting data
DataSubset <- subSet(X, Rfilter)
dim(DataSubset)

FMradio documentation built on Dec. 16, 2019, 5:43 p.m.