Skip to content

topic modeling tutorial not showing notebook beyond output of Ln {22} #9

@gitter587

Description

@gitter587

Topic Modelling with scikit-learn
Let us now use NMF and LDA which is available in sklearn to see how these topics work.

In [20]:
import sklearn
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from sklearn.datasets import fetch_20newsgroups
from sklearn.decomposition import NMF, LatentDirichletAllocation
In [21]:
dataset = fetch_20newsgroups(shuffle=True, random_state=1, remove=('headers', 'footers', 'quotes'))
documents = dataset.data
In [22]:
documents
Out[22]:
[u"Well i'm not sure about the story nad it did seem biased. What\nI disagr

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions