I have recently started coding neural networks with keras. I managed to get an AI running that predicts the classes of the reuters newswire dataset. However, I am desperately looking for a way to convert my predictions (intgers) to topics. There has to be a dictionary -like the reuters.get_word_index for the training data- that has 46 entries and links each integer to its topic (string). Thanks for your help.
Asked
Active
Viewed 1,285 times
1
-
Possible duplicate of https://stackoverflow.com/questions/45138290/how-to-show-topics-of-reuters-dataset-in-keras – Amir Jan 18 '19 at 19:39
2 Answers
5
Unfortunately it seems that Keras dataset lacks information about topics. You could use nltk version of the same dataset. You can get topic names there too. Refer to https://martin-thoma.com/nlp-reuters/ for details.

Bulat Maksudov
- 51
- 3
2
['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']
Seem to be the labels as seen here

Sakshi Udeshi
- 21
- 2