dimred {dyndimred}R Documentation

Perform simple dimensionality reduction

Description

Perform simple dimensionality reduction

Usage

dimred(x, method, ndim, ...)

dimred_dm_destiny(
  x,
  ndim = 2,
  distance_method = c("euclidean", "spearman", "cosine")
)

dimred_dm_diffusionmap(
  x,
  ndim = 2,
  distance_method = c("pearson", "spearman", "cosine", "euclidean", "chisquared",
    "hamming", "kullback", "manhattan", "maximum", "canberra", "minkowski")
)

dimred_ica(x, ndim = 3)

dimred_knn_fr(
  x,
  ndim = 2,
  lmds_components = 10,
  distance_method = c("pearson", "spearman", "cosine", "euclidean", "chisquared",
    "hamming", "kullback", "manhattan", "maximum", "canberra", "minkowski"),
  n_neighbors = 10
)

dimred_landmark_mds(
  x,
  ndim = 2,
  distance_method = c("pearson", "spearman", "cosine", "euclidean", "chisquared",
    "hamming", "kullback", "manhattan", "maximum", "canberra", "minkowski")
)

dimred_lle(x, ndim = 3)

dimred_mds(
  x,
  ndim = 2,
  distance_method = c("pearson", "spearman", "cosine", "euclidean", "chisquared",
    "hamming", "kullback", "manhattan", "maximum", "canberra", "minkowski")
)

dimred_mds_isomds(
  x,
  ndim = 2,
  distance_method = c("pearson", "spearman", "cosine", "euclidean", "chisquared",
    "hamming", "kullback", "manhattan", "maximum", "canberra", "minkowski")
)

dimred_mds_sammon(
  x,
  ndim = 2,
  distance_method = c("pearson", "spearman", "cosine", "euclidean", "chisquared",
    "hamming", "kullback", "manhattan", "maximum", "canberra", "minkowski")
)

dimred_mds_smacof(
  x,
  ndim = 2,
  distance_method = c("pearson", "spearman", "cosine", "euclidean", "chisquared",
    "hamming", "kullback", "manhattan", "maximum", "canberra", "minkowski")
)

dimred_pca(x, ndim = 2)

list_dimred_methods()

Arguments

x

Log transformed expression data, with rows as cells and columns as features

method

The name of the dimensionality reduction method to use

ndim

The number of dimensions

...

Any arguments to be passed to the dimensionality reduction method

distance_method

The name of the distance metric, see dynutils::calculate_distance

lmds_components

The number of lmds components to use. If NULL, LMDS will not be performed first. If this is a matrix, it is assumed it is a dimred for x.

n_neighbors

The size of local neighborhood (in terms of number of neighboring sample points).

Examples

library(Matrix)
x <- abs(Matrix::rsparsematrix(100, 100, .5))
dimred(x, "pca", ndim = 3)
dimred(x, "ica", ndim = 3)

if (interactive()) {
  dimred_dm_destiny(x)
  dimred_dm_diffusionmap(x)
  dimred_ica(x)
  dimred_landmark_mds(x)
  dimred_lle(x)
  dimred_mds(x)
  dimred_mds_isomds(x)
  dimred_mds_sammon(x)
  dimred_mds_smacof(x)
  dimred_pca(x)
  dimred_tsne(x)
  dimred_umap(x)
}


[Package dyndimred version 1.0.4 Index]