Skip to content

(v3.4.1) IndexError: index 46308 is out of bounds for axis 1 with size 17797 #253

Open
@ooker777

Description

I get

IndexError: index 46308 is out of bounds for axis 1 with size 17797

I'm using pyLDAvis v3.4.1 on Python 3.10.10 on Windows. Here is the full code:

import pickle
from gensim import models
import pyLDAvis.gensim

id2word = pickle.load(open('../data/id2word.pkl','rb'))
cv_vecs = pickle.load(open('../data/cv_vecs.pkl','rb'))
cv_corpus = pickle.load(open('../data/cv_corpus.pkl','rb'))
lda =  models.LdaModel.load('../data/gensim_lda.model')

viz = pyLDAvis.gensim.prepare(topic_model=lda, corpus=cv_corpus, dictionary=id2word, mds='mmds')

You can check the input files here

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions