Description Usage Arguments Details Value Author(s) See Also Examples
Filters out variables or features that lead to collinearities in the input data.
1 | filterCollinearities(X, soft.filter=FALSE, long.dim.are.variables=TRUE)
|
X |
data set where collinearities are identified. |
soft.filter |
logical; if FALSE (default) then the intput object
|
long.dim.are.variables |
logical; if TRUE (default) it is assumed
that when |
The input object X
can be either a matrix
object, a
data.frame
object or any other class of object that can be
handled by the function qpPCC()
, which is internally called,
such as an ExpressionSet
object.
The input object X
without the variables or features that
lead to collinearities when soft.filter=FALSE
, its default
value. Otherwise, when soft.filter=TRUE
then a logical mask
is returned.
R. Castelo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## build an undirected GMM model with
## average correlation 0.99 on the present edges
set.seed(1234)
gmm <- rUGgmm(dRegularGraphParam(), rho=0.99)
gmm
## sample n=100 observations from this GMM
X <- rmvnorm(100, gmm)
dim(X)
head(X)
## notice some variables lead to collinearities (r > 0.99)
cor(X)
## mask those variables
mask <- filterCollinearities(X, long.dim.are.variables=FALSE,
soft.filter=TRUE)
mask
head(X[, !mask])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.