computeSpectralEmbeddingSample: Spectral embedding

View source: R/sampleCompute.R

computeSpectralEmbeddingSampleR Documentation

Spectral embedding

Description

Perform spectral embedding for non-linear dimensionality reduction.

Usage

computeSpectralEmbeddingSample(
  data.sample,
  use.sampling = FALSE,
  sampling.size.max = 0,
  scale = FALSE,
  selected.var = NULL,
  echo = FALSE,
  RclusTool.env = initParameters()
)

Arguments

data.sample

list containing features, profiles and clustering results.

use.sampling

boolean: if FALSE (default), data sampling is not used.

sampling.size.max

numeric: maximal size of the sampling set.

scale

boolean, if FALSE (default), data scaling is not used.

selected.var

vector of features names to consider for the spectral embedding.

echo

boolean: if FALSE (default), no description printed in the console.

RclusTool.env

environment in which all global parameters, raw data and results are stored.

Details

computeSpectralEmbeddingSample performs Spectral embedding for non-linear dimensionality reduction

Value

features list containing the results of spectral embedding, returned by spectralEmbeddingNg.

See Also

computePcaSample

Examples

dat <- rbind(matrix(rnorm(100, mean = 0, sd = 0.3), ncol = 2), 
             matrix(rnorm(100, mean = 2, sd = 0.3), ncol = 2), 
             matrix(rnorm(100, mean = 4, sd = 0.3), ncol = 2))
tf <- tempfile()
write.table(dat, tf, sep=",", dec=".")
x <- importSample(file.features=tf)

res <- computeSpectralEmbeddingSample(x)

plot(res$x[,1], res$x[,2], main="Spectral Embedding", xlab="SC1", ylab="SC2")



RclusTool documentation built on May 29, 2024, 5:23 a.m.