Computational Physics, Python, Linear Algebra, Svd, Code.
data belong? np.array(newsgroups_train.target_names)[newsgroups_train.target[:4]] array([‘comp.graphics’, ‘talk.religion.misc’, ‘sci.space’, ‘alt.atheism’], dtype=’<U18') We assign a target index to each of them: newsgroups_train.target[:10] array([1, 3, 2, 0, 2, 0, 2, 1, 2, 1], dtype=int64)