An OpenAI Gym for Display Advertisment Reinforcement Learning
Project description
gym-display-advertising
An OpenAI Gym for Display Advertisment Reinforcement Learning
Installation
pip install gym-display-advertising
Usage
import gym_display_advertising
env = gym.make("StaticDisplayAdvertising-v0")
episode_over = False
while not episode_over:
state, reward, episode_over, _ = env.step(env.action_space.sample())
print(state, reward)
import gym_display_advertising
env = gym.make("DisplayAdvertising-v0")
episode_over = False
while not episode_over:
state, reward, episode_over, _ = env.step(env.action_space.sample())
print(state, reward)
Real Ad Bidding Data
The repository contains real-life bidding data from a single merchant and loads this by default. If you want to load more data follow the instructions in the make-ipinyou-data repository to create the data.
Then use the helper class ProcessedIPinYouData
to load the data and pass the dataframe into the gym.make
command.
import pathlib
import gym
import gym_display_advertising
ipinyou = gym_display_advertising.data.ProcessedIPinYouData(directory=pathlib.Path("path/to/file"))
training_data, _ = ipinyou.get_merchant_data(2997)
env = gym.make("DisplayAdvertising-v0", data=training_data)
state, reward, _, _ = env.step(env.action_space.sample())
print(state, reward)
Acknowledgements
This is a project by Winder Research, a Cloud-Native Data Science consultancy.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for gym_display_advertising-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2210d234c80ae914442a14d092cb2b4fdc7009b9236be68a5929781747460fcc |
|
MD5 | 495963546bb83a63315488f73562d038 |
|
BLAKE2b-256 | 42c3bf5f31aae4eea0e38b8ae2c6b0128c3f00306f88145f7e4c8c20d7e33fd2 |
Close
Hashes for gym_display_advertising-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd703412daf918d5f7d2f637b9a5f666f96fdbb2e9a346f086eff2d55139682d |
|
MD5 | 114b5acd508bf9845d7de0d686c6d0b3 |
|
BLAKE2b-256 | 039b921afb089808b6486686c922a9d578980dd2b691cd010cca89791560b080 |