egttools.calculate_strategies_distribution¶
- calculate_strategies_distribution(pop_size: int, nb_strategies: int, stationary_distribution: scipy.sparse.csr_matrix[numpy.float64]) numpy.ndarray[numpy.float64[m, 1]] ¶
Calculates the average frequency of each strategy available in the population given the stationary distribution.
It expects that the stationary_distribution is in sparse form.
- Parameters
pop_size (int) – Size of the population.
nb_strategies (int) – Number of strategies that can be assigned to players.
stationary_distribution (scipy.sparse.csr_matrix) – A sparse matrix which contains the stationary distribution (the frequency with which the evolutionary system visits each stationary state).
- Returns
Average frequency of each strategy in the stationary evolutionary system.
- Return type
numpy.ndarray[numpy.float64[m, 1]]
See also
egttools.numerical.calculate_state
,egttools.numerical.sample_simplex
,egttools.numerical.calculate_nb_states
,egttools.numerical.PairwiseComparisonNumerical.estimate_stationary_distribution
,egttools.numerical.calculate_nb_states
,egttools.numerical.PairwiseComparisonNumerical.estimate_stationary_distribution_sparse