6.14.8.1. scikits.learn.feature_extraction.text.sparse.TfidfTransformer¶
- class scikits.learn.feature_extraction.text.sparse.TfidfTransformer(use_tf=True, use_idf=True)¶
Methods
fit(X[, y]) Learn the IDF vector (global term weights) transform(X[, copy]) Transform a count matrix to a TF or TF-IDF representation - __init__(use_tf=True, use_idf=True)¶
- fit(X, y=None)¶
Learn the IDF vector (global term weights)
Parameters : X: sparse matrix, [n_samples, n_features] :
a matrix of term/token counts
- transform(X, copy=True)¶
Transform a count matrix to a TF or TF-IDF representation
Parameters : X: sparse matrix, [n_samples, n_features] :
a matrix of term/token counts
Returns : vectors: sparse matrix, [n_samples, n_features] :