tfidf: tfidf

View source: R/tfidf.R

tfidfR Documentation

tfidf

Description

Get a normalized TFIDF matrix from peak-by-cell matrix from single cell profiles

Usage

tfidf(bmat, mat_binary = TRUE, TF = TRUE, log_TF = TRUE, scale_factor = 1e+05)

Arguments

bmat

a sparse/dense matrix or dataframe indicating count matrix (peak-by-cell matrix)

mat_binary

a logic value to indicate if input bmat is spare matrix or not. bmat will be converted into a sparse matrix.

TF

a logic value to indicate if term frequency (TF) normalization is performed

log_TF

a logic value to indicate if natural logarithm values of the TF are calculated and used

scale_factor

a scale factor used to multiple the resulting TF-IDF matrix

Value

a sparse matrix of normalized TFIDF matrix

Examples

## Not run: 
tfidf_mat <- tfidf(bmat=peakbycellmatrix, mat_binary=TRUE, TF=TRUE, log_TF=TRUE)
## End(Not run)


fl-yu/SCAVENGE documentation built on April 2, 2022, 10:56 a.m.