Skip to content

Commit

Permalink
Fix bug in Match-TwoQueries
Browse files Browse the repository at this point in the history
  • Loading branch information
natsuozawa committed Apr 2, 2024
1 parent 0258f01 commit 9c48c41
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion socialchoicekit/elicitation_allocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,5 +196,15 @@ def get_simulated_cardinal_profile(
A = root_n_serial_dictatorship(profile)

# Elicit the agent's cardinal utility of the item they are assigned to in A.
v_tilde[np.arange(n), A] = elicitor.elicit_multiple(np.arange(n), A)
for i in range(n):
j = A[i]
v_tilde[i, A[i]] = elicitor.elicit(i, j)
current_rank = profile[i, j]
current_rank -= 1
while current_rank > 1:
# Set the utility of all items up to but not including the favorite item.
j = ranked_profile[i, current_rank - 1]
v_tilde[i, j] = v_tilde[i, A[i]]
current_rank -= 1

return IncompleteValuationProfile.of(v_tilde)

0 comments on commit 9c48c41

Please sign in to comment.