A class for viewing Term frequency-Inverse document Frequency model.
Methods
| __init__(corpus, model) | Initialize TfIdfViewer. |
| dismat_doc(doc_list[, dist_fn]) | Calculates a distance matrix for a given list of documents. |
| dismat_word(word_list[, dist_fn]) | Calculates a distance matrix for a given list of words. |
| dist_doc_doc(doc_or_docs[, weights, ...]) | Computes and sorts the distances between a document or list of documents and every document. |
| dist_word_doc(word_or_words[, weights, ...]) | Computes and sorts distances between a word or a list of words to every document. |
| dist_word_word(word_or_words[, weights, ...]) | Computes and sorts the distances between a word or list of words and every word. |
Initialize TfIdfViewer.
| Parameters: |
|
|---|
Calculates a distance matrix for a given list of documents.
| Parameters: |
|
|---|---|
| Returns: | an instance of IndexedSymmArray. n x n matrix containing floats where n is the number of documents. |
| See Also: | vsm.viewer.wrappers.dismat_doc() |
Calculates a distance matrix for a given list of words.
| Parameters: |
|
|---|---|
| Returns: | an instance of IndexedSymmArray. n x n matrix containing floats where n is the number of words in word_list. |
| See Also: | vsm.viewer.wrappers.distmat_word() |
Computes and sorts the distances between a document or list of documents and every document.
| Parameters: |
|
|---|---|
| Returns: | an instance of LabeledColumn. A 2-dim array containing documents and their cosine values to doc_or_docs. |
| See Also: | vsm.viewer.wrappers.dist_doc_doc() |
Computes and sorts distances between a word or a list of words to every document.
| Parameters: |
|
|---|---|
| Returns: | an instance of LabeledColumn. A 2-dim array containing documents and their distances to word_or_words. |
| See Also: | vsm.viewer.wrappers.dist_word_doc() |
Computes and sorts the distances between a word or list of words and every word.
| Parameters: |
|
|---|---|
| Returns: | an instance of LabeledColumn. A 2-dim array containing words and their cosine values to word_or_words. |
| See Also: | vsm.viewer.wrappers.dist_word_word() |