compute_moran_transition_probability

ludics.compute_moran_transition_probablity(source, target, fitness_function, selection_intensity, fitness_map, **kwargs)

Calculates the probability of transitioning from source to target in the Moran process

Parameters:

  • source: numpy.array - the current state
  • target: numpy.array - the state being transitioned to
  • fitness_function: func - takes a numpy.array and returns an `array of floats with the same shape
  • selection_intensity: numpy.array or float - the selection intensity of the process. Must have shape \((N,N)\) if passed as an array
  • fitness_map: func - the mapping of the fitness by selection intensity onto a strictly positive value. Must accept parameters fitness, selection_intensity, and **kwargs. By default, this is set to the linear_fitness_map function.

Returns:

  • float if source != target, else None