R/DimReduction.R
subsetDimReduction.Rd
Compute dimensionality reduction for subsets of the input data
subsetDimReduction(Y, seed, size = 0.8, nrSubsets = 10, method, optN = NULL, ndim = NULL, kmin = 1, kmax = 40, verbose = FALSE, parallel = FALSE, is.list.ellipsis = FALSE, ...)
Y | \[N x P\] data matrix for which the dimensionality of P should be reduced, |
---|---|
seed | [integer] seed to initialise random number generator for drawing subsets of Y. |
size | [double] proportion of samples from total number of samples to to choose for each subset. |
nrSubsets | [integer] number of subsets to generate and apply dimensionality reduction to. |
method | dimensionality reduction method [character] to be applied; one of DiffusionMap, DRR, ICA, LLE, Isomap, LaplacianEigenmap, MDS, PCA, kPCA, nMDS, tSNE and PEER. |
optN | optimal number [integer] of neighbours to consider for dimensionality
reduction; relevant for methods LLE, LaplacianEigenmaps, Isomap and tSNE. If
not provided, will be estimated via |
ndim | maximum dimensionality [int] to retain in the data; large values can cause long computation times; if not provided max(P,N) is chosen. |
kmin | if optN is not provided, kmin [int] specifies the minimum number
of neighbours supplied to |
kmax | if optN is not provided, kmax [int] specifies the maximum number
of neighbours supplied to |
verbose | [logical] If set, progress messages are printed to standard out. |
parallel | if optN is not provided and parallel TRUE, parallel
computation on multiple cpu cores is used with |
is.list.ellipsis | [logical] if ... arguments are provided as list, set TRUE. |
... | Additional arguments passed to dimensionality reduction methods. For possible arguments, check function decomentation. See details for relevant packages and functions. |
list of size nrSubsets, containing at each entry a named list of
results from computeDimReduction
:
Y_red: named list with dimensionality reduced phenotypes (reducedY) and
object returned by specified dimensionality reduction method (results) with
additional output
M: vector [double] with Trustworthiness and Continuity estimates for the
dimensionality reduction
subsetDimReduction wraps around the following implementations of
the dimensionality reduction methods it provides:
* Diffusion Map: diffuse
* Dimensionality reduction by regression (DRR): drr
* Independent component analysis (ICA): fastICA
* Local liner embedding (LLE): lle
* Isomap: isomap
* Laplacian Eigenmap: spec.emb
and
make.kNNG
* Multi-dimensional scaling (MDS) : cmdscale
* Principal component analysis (PCA): prcomp
* Kernel PCA (kPCA): kpca
* non-metrix MDS (nMDS): metaMDS
* t- stochastic neighbourhood embedding (tSNE): Rtsne
* Uniform manifold approximation and projection (umap):
umap
* PEER: PEER