Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show topics of reuters dataset in Keras?

I use reuters dataset in Keras.

And I want to know the 46 topics' names.

How can I show topics of reuters dataset in Keras?

https://keras.io/datasets/#reuters-newswire-topics-classification

like image 398
hyeon Avatar asked Jul 17 '17 07:07

hyeon


People also ask

What is Reuters dataset keras?

This is a dataset of 11,228 newswires from Reuters, labeled over 46 topics. This was originally generated by parsing and preprocessing the classic Reuters-21578 dataset, but the preprocessing code is no longer packaged with Keras.

What is Reuters dataset?

The Reuters-21578 dataset is a collection of documents with news articles. The original corpus has 10,369 documents and a vocabulary of 29,930 words. Source: Topic Model Based Multi-Label Classification from the Crowd.


1 Answers

Associated mapping of topic labels as per original Reuters Dataset with the topic indexes in Keras version is:

['cocoa','grain','veg-oil','earn','acq','wheat','copper','housing','money-supply',
 'coffee','sugar','trade','reserves','ship','cotton','carcass','crude','nat-gas',
 'cpi','money-fx','interest','gnp','meal-feed','alum','oilseed','gold','tin',
 'strategic-metal','livestock','retail','ipi','iron-steel','rubber','heat','jobs',
 'lei','bop','zinc','orange','pet-chem','dlr','gas','silver','wpi','hog','lead']

To understand the approach of extracting the above mapping, please follow this thread comment.

like image 92
bazinga Avatar answered Oct 12 '22 00:10

bazinga