nmf_models.nmf_models_mod_updates.log_tf_idf

log_tf_idf(mat_in, scale=10000)[source]

Return a TF-IDF transformed matrix.

Parameters:
  • mat_in (csr matrix type) – Positional (required) matrix to be TF-IDF transformed. Should be cell x feature.

  • scale (int) – scale values by this number (optional)

Raises:

nmf_models.InvalidMatType – If the mat type is invalid:

Returns:

TF-IDF transformed matrix

Return type:

csr matrix