plot a document tfidf 2D graph

后端 未结 2 1179
失恋的感觉
失恋的感觉 2020-12-07 13:27

I would like to plot a 2d graph with the x-axis as term and y-axis as TFIDF score (or document id) for my list of sentences. I used scikit learn\'s fit_transform() to get th

2条回答
  •  遥遥无期
    2020-12-07 14:07

    Just assign a variable to the labels and use that to denote color. ex km = Kmeans().fit(X) clusters = km.labels_.tolist() then c=clusters

提交回复
热议问题