简体   繁体   English

LDA 可视化 [import_optional_dependency() 得到了一个意外的关键字参数“错误”]

[英]LDA visualization [ import_optional_dependency() got an unexpected keyword argument 'errors' ]

i got a error message while visualizing LDA model我在可视化 LDA 模型时收到一条错误消息

import pyLDAvis
import pyLDAvis.gensim_models

pyLDAvis.enable_notebook()

vis = pyLDAvis.gensim_models.prepare(ldamodel,corpus, dictionary)
vis

and it gives me error message " import_optional_dependency() got an unexpected keyword argument 'errors'"它给了我错误消息“import_optional_dependency() 得到了一个意外的关键字参数‘错误’”

I've got the same error.我有同样的错误。 The older version of import_optional_dependency() doesn't have the argument 'error'.旧版本的import_optional_dependency()没有参数“错误”。

Check your pandas version :检查您的熊猫版本:

import pandas as pd
print(pd.__version__)

If your version is less than 1.3, install the updated version :如果您的版本低于 1.3,请安装更新版本:

!pip install pandas==1.3.1

or或者

!pip install pandas --upgrade

That worked for me.那对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM