tf.keras.datasets.reuters.load_data

View source on GitHub

Loads the Reuters newswire classification dataset.

tf.keras.datasets.reuters.load_data(
    path='reuters.npz', num_words=None, skip_top=0, maxlen=None, test_split=0.2,
    seed=113, start_char=1, oov_char=2, index_from=3, **kwargs
)

Arguments:

Returns:

Tuple of Numpy arrays: (x_train, y_train), (x_test, y_test).

Note that the 'out of vocabulary' character is only used for words that were present in the training set but are not included because they're not making the num_words cut here. Words that were not seen in the training set but are in the test set have simply been skipped.