dm_predict: Predict new data points using an existing DiffusionMap. The...

View source: R/predict.r

dm_predictR Documentation

Predict new data points using an existing DiffusionMap. The resulting matrix can be used in the plot method for the DiffusionMap

Description

Predict new data points using an existing DiffusionMap. The resulting matrix can be used in the plot method for the DiffusionMap

Usage

dm_predict(dm, new_data, ..., verbose = FALSE)

Arguments

dm

A DiffusionMap object.

new_data

New data points to project into the diffusion map. Can be a matrix, data.frame, ExpressionSet, or SingleCellExperiment.

...

Passed to proxy::dist(new_data, data, dm@distance, ...).

verbose

Show progress messages?

Value

A nrow(new\_data) \times ncol(eigenvectors(dif)) matrix of projected diffusion components for the new data.

Examples

data(guo)
g1 <- guo[, guo$num_cells != 32L]
g2 <- guo[, guo$num_cells == 32L]
dm <- DiffusionMap(g1)
dc2 <- dm_predict(dm, g2)
plot(dm, new_dcs = dc2)


theislab/destiny documentation built on Oct. 30, 2024, 1:39 a.m.