Learn R Programming

RclusTool (version 0.91)

computeSpectralEmbeddingSample: 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 = F, 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.

Value

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

Details

computeSpectralEmbeddingSample performs Spectral embedding for non-linear dimensionality reduction

See Also

computePcaSample

Examples

Run this code
# NOT RUN {
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, dir.save=tempdir())

res <- computeSpectralEmbeddingSample(x)

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


# }

Run the code above in your browser using DataLab