rtbgym.envs.simulator.base.BaseWinningPriceDistribution#

class rtbgym.envs.simulator.base.BaseWinningPriceDistribution[source]#

Base class to sample the winning price (i.e., second price) and compare it with the given bid price.

Imported as: class:rtbgym.BaseWinningPriceDistribution

Methods

sample_outcome(bid_prices, ad_ids, user_ids, ...)

Stochastically determine impression and second price for each auction.

abstract sample_outcome(bid_prices, ad_ids, user_ids, ad_feature_vector, user_feature_vector, timestep)[source]#

Stochastically determine impression and second price for each auction.

Parameters:
  • bid_prices (array-like of shape (search_volume, )) – Bid price for each auction.

  • ad_ids (array-like of shape (search_volume/n_samples, )) – Ad ids used for each auction.

  • user_ids (array-like of shape (search_volume/n_samples, )) – User ids used for each auction.

  • ad_feature_vector (array-like of shape (search_volume/n_samples, ad_feature_dim)) – Ad feature vector for each auction.

  • user_feature_vector (array-like of shape (search_volume/n_samples, user_feature_dim)) – User feature vector for each auction.

  • timestep ({int, array-like of shape (n_samples, )}) – Timestep in the RL environment.

Returns:

  • impressions (ndarray of shape (search_volume, )) – Whether impression occurred for each auction.

  • winning_prices (ndarray of shape (search_volume, )) – Sampled winning price for each auction.

Return type:

Tuple[ndarray]

Methods