Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tfidf dist_doc_doc index out of bounds #159

Open
colinallen opened this issue Feb 6, 2018 · 0 comments
Open

tfidf dist_doc_doc index out of bounds #159

colinallen opened this issue Feb 6, 2018 · 0 comments
Labels
bug non-LDA Tag for non-LDA models, these are a lower priority for fixes

Comments

@colinallen
Copy link
Member

colinallen commented Feb 6, 2018

(error when using SEP corpus)

tfi = TfIdf(c, context_type)
tfi.train()
tfi_v = TfIdfViewer(c,tfi)
tfi_v.dist_doc_doc(0)

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-111-4eb19a08b256> in <module>()
----> 1 tfi_v.dist_doc_doc(0)

/Users/colin_1/anaconda2/lib/python2.7/site-packages/vsm/viewer/tfidfviewer.pyc in dist_doc_doc(self, doc_or_docs, weights, print_len, filter_nan, label_fn, as_strings, dist_fn, order)
    135                               print_len=print_len, filter_nan=filter_nan,
    136                               label_fn=def_label_fn, as_strings=True,
--> 137                               dist_fn=dist_fn, order=order)
    138 
    139     @deprecated_meth("dist_word_doc")

/Users/colin_1/anaconda2/lib/python2.7/site-packages/vsm/viewer/wrappers.pyc in dist_doc_doc(doc_or_docs, corp, context_type, mat, weights, filter_nan, print_len, label_fn, as_strings, dist_fn, order)
    161         doc = csr_matrix(doc)
    162     else:
--> 163         cols = mat[:,docs]
    164         doc = np.average(cols, weights=weights, axis=1)
    165 

IndexError: index 0 is out of bounds for axis 1 with size 0
@JaimieMurdock JaimieMurdock added this to the Topic Explorer 1.0 milestone Apr 7, 2018
@JaimieMurdock JaimieMurdock added bug non-LDA Tag for non-LDA models, these are a lower priority for fixes labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug non-LDA Tag for non-LDA models, these are a lower priority for fixes
Projects
None yet
Development

No branches or pull requests

2 participants