dynamic_cost_distribution#

caf.toolkit.cost_utils.dynamic_cost_distribution(matrix, cost_matrix, *args, **kwargs)[source]#

Calculate the distribution of costs across a matrix, using dynamic bins.

Parameters:
  • matrix (ndarray) – The matrix to calculate the cost distribution for. This matrix should be the same shape as cost_matrix

  • cost_matrix (ndarray) – A matrix of cost relating to matrix. This matrix should be the same shape as matrix

  • *args – arguments to pass through to create_log_bins

  • **kwargs – arguments to pass through to create_log_bins

Returns:

A numpy array of the sum of trips by distance band.

Return type:

cost_distribution

See also

None