View source: R/sampleCompute.R
computeSpectralEmbeddingSample | R Documentation |
Perform spectral embedding for non-linear dimensionality reduction.
computeSpectralEmbeddingSample(
data.sample,
use.sampling = FALSE,
sampling.size.max = 0,
scale = FALSE,
selected.var = NULL,
echo = FALSE,
RclusTool.env = initParameters()
)
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. |
computeSpectralEmbeddingSample performs Spectral embedding for non-linear dimensionality reduction
features list containing the results of spectral embedding, returned by spectralEmbeddingNg.
computePcaSample
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.