bnelearn.mechanism.contests_single_item module¶
- class bnelearn.mechanism.contests_single_item.CrowdsourcingContest(cuda: bool = True)[source]¶
Bases:
Mechanism
Crowdsourcing Contest
- run(bids: Tensor) Tuple[Tensor, Tensor] [source]¶
Runs a (batch of) Crowdsourcing Contests.
If a effort tensor for multiple items is submitted, each item is auctioned independently of one another.
Parameters¶
- efforts: torch.Tensor
of efforts with dimensions (*batch_sizes, n_players, n_items)
Returns¶
- (allocation, payments): Tuple[torch.Tensor, torch.Tensor]
- class bnelearn.mechanism.contests_single_item.TullockContest(impact_function, cuda: bool = True)[source]¶
Bases:
Mechanism
Tullock Contest
- run(bids: Tensor) Tuple[Tensor, Tensor] [source]¶
Runs a (batch of) Tullock Contests.
This function is meant for single-item contests. If a effort tensor for multiple items is submitted, each item is auctioned independently of one another.
Note that if multiple contestants submit the highest effort, we choose the first one.
Parameters¶
- bids: torch.Tensor
of efforts with dimensions (*batch_sizes, n_players, n_items)
Returns¶
- (winning_probs, payments): Tuple[torch.Tensor, torch.Tensor]