reduce_dimensionality: Dimensionality reduction

Description Usage Arguments Value See Also Examples

View source: R/dimensionality_reduction.R

Description

reduce_dimensionality performs an eigenanalysis of the given dissimilarity matrix and returns coordinates of the samples represented in an ndim-dimensional space.

Usage

1
2
3
reduce_dimensionality(x, dist = c("pearson", "spearman", "cosine",
  "euclidean", "manhattan"), ndim = 3, num_landmarks = 1000,
  rescale = TRUE)

Arguments

x

a numeric matrix

dist

the distance metric to be used; can be any of the metrics listed in dynutils::calculate_distance().

ndim

the maximum dimension of the space which the data are to be represented in; must be in 1, 2, ..., n-1.

num_landmarks

the number of landmarks to be selected.

rescale

A logical indicating whether or not the returned space should be rescaled and centered.

Value

A matrix containing the coordinates of each sample, represented in an ndim-dimensional space.

See Also

SCORPIUS

Examples

1
2
3
4
5
6
7
8
## Generate an example dataset
dataset <- generate_dataset(num_genes = 500, num_samples = 1000, num_groups = 4)

## Reduce the dimensionality of this dataset
space <- reduce_dimensionality(dataset$expression, ndim = 2)

## Visualise the dataset
draw_trajectory_plot(space, progression_group = dataset$sample_info$group_name)

SCORPIUS documentation built on Aug. 7, 2019, 5:02 p.m.