In [1]:
categories = ['alt.atheism', 'soc.religion.christian', 'comp.graphics', 'sci.med']
In [2]:
from sklearn.datasets import fetch_20newsgroups
In [3]:
twenty_train = fetch_20newsgroups(subset='train', categories=categories, shuffle=True, random_state=42)
In [4]:
twenty_train.target_names
Out[4]:
In [ ]: