exact_batch#

actinvoting.exact_batch(session, ns, n_jobs=1, file_name=None, force_recompute=False)[source]#

Compute the exact probabilities for a list of values of n.

Parameters:
  • session (WorkingSession) – The working session specifying the culture and the parameters of the model.

  • ns (list of int) – The list of values of n (number of voters) for which the values of the exact probability are to be computed.

  • n_jobs (int) – The number of parallel jobs to run. If n_jobs=1, the computation is done in a single process.

  • file_name (str) – The name of the file where the result is saved. If None, the file name is automatically generated.

  • force_recompute (bool) – If True, the computation is done even if the file already exists.

Returns:

The list of exact probabilities for the values of n in the input list.

Return type:

list of float