factorizeMatrix,celda_G-method {celda} | R Documentation

## Matrix factorization for results from celda_G

### Description

Generates factorized matrices showing the contribution of each feature in each module and each module in each cell.

### Usage

    ## S4 method for signature 'celda_G'
    factorizeMatrix(counts, celdaMod, type = c("counts",
      "proportion", "posterior"))

### Arguments

`counts` | Integer matrix. Rows represent features and columns represent cells. This matrix should be the same as the one used to generate 'celdaMod'.
`celdaMod` | Celda object of class "celda_G".
`type` | Character vector. A vector containing one or more of "counts", "proportion", or "posterior". "counts" returns the raw number of counts for each factorized matrix. "proportions" returns the normalized probabilities for each factorized matrix, which are calculated by dividing the raw counts in each factorized matrix by the total counts in each column. "posterior" returns the posterior estimates. Default 'c("counts", "proportion", "posterior")'.

### Value

A list with elements for 'counts', 'proportions', or 'posterior' probabilities. Each element will be a list containing factorized matrices for 'module' and 'cell'.

### See Also

'celda_G()' for clustering features

### Examples

    data(celdaGSim, celdaGMod)
    factorizedMatrices <- factorizeMatrix(celdaGSim$counts,
        celdaGMod, "posterior")

[Package celda version 1.0.4 Index]