dm_predict {destiny} | R 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)

[Package destiny version 2.14.0 Index]