Skip to content

NewsArticles

News articles bandit dataset.

This is a personalization dataset. It contains 10000 observations. There are 10 arms, and the reward is binary. There are 100 features, which turns this into a contextual bandit problem.

Attributes

  • arms

    The list of arms that can be pulled.

  • desc

    Return the description from the docstring.

  • is_downloaded

    Indicate whether or the data has been correctly downloaded.

  • path

Examples

from river import bandit

dataset = bandit.datasets.NewsArticles()
context, arm, reward = next(iter(dataset))

len(context)
100

arm, reward
(2, False)

Methods

download
take

Iterate over the k samples.

Parameters

  • k'int'