subSet {FMradio} | R Documentation |
Subset a data matrix or expression set
Description
subSet
is a convenience function that subsets a data matrix
or an ExpressionSet
object.
Usage
subSet(X, Rf)
Arguments
X |
A data |
Rf |
A filtered (correlation) |
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
Examples
## 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)