【发布时间】:2021-04-27 07:10:28
【问题描述】:
我有点困惑,我想使用 texthero 库进行一些 pca 分析。但是当我尝试运行我的代码时:
import texthero as hero
import pandas as pd
df['pca']=(df['clean_tweet'].pipe(hero.clean).pipe(hero.do_tfidf).pipe(hero.do_pca))
hero.scatterplot(df, col='pca', color='topic', title="PCA BBC Sport news")
我得到错误:
ModuleNotFoundError: No module named 'gensim.sklearn_api
但是当我把 !pip show gensim.我得到了
Name: gensim
Version: 4.0.1
Summary: Python framework for fast Vector Space Modelling
Home-page: http://radimrehurek.com/gensim
【问题讨论】:
标签: python pandas machine-learning gensim