Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

softmax_pick.m 402 B

1234567891011
  1. function [choice, pchoice] = softmax_pick(Q, temperature)
  2. % [choice, pchoice] = softmax_pick(Q, temperature)
  3. % Inputs:
  4. % Q should be a vector of values (e.g. values of taking an action)
  5. % temperature [1] The softmax temp. As temperature goes to ∞ output becomes random.
  6. %
  7. total = sum(exp(Q/temperature));
  8. pchoice = exp(Q./temperature)./total;
  9. choice = utils.pick_with_prob(1:numel(Q),pchoice);