GravityModelRunResults#
- class caf.distribute.gravity_model.core.GravityModelRunResults(cost_distribution, cost_convergence, value_distribution, target_cost_distribution=None, cost_function=None, cost_params=None)#
Bases:
GravityModelResultsA collection of results from a run of the Gravity Model.
- Parameters:
cost_distribution (caf.toolkit.cost_utils.CostDistribution) – The achieved cost distribution of the run.
cost_convergence (float) – The achieved cost convergence value of the run. If target_cost_distribution is not set, then this should be 0. This will be the same as calculating the convergence of cost_distribution and target_cost_distribution.
value_distribution (numpy.ndarray) – The achieved distribution of the given values (usually trip values between different places).
target_cost_distribution (caf.toolkit.cost_utils.CostDistribution | None) – If set, this will be the cost distribution the gravity model was aiming for during its run.
cost_function (caf.distribute.cost_functions.CostFunction | None) – If set, this will be the cost function used in the gravity model run.
cost_params (dict[str, Any] | None) – If set, the cost parameters used with the cost_function to achieve the results.
Attributes Summary
Summary of the GM run parameters as a series.
Attributes Documentation
- cost_function: CostFunction | None = None#
- cost_params: dict[str, Any] | None = None#
- summary#
Summary of the GM run parameters as a series.
Outputs the gravity model parameters used to generate the distribution.
- Returns:
a summary of the run
- Return type:
pd.DataFrame
- target_cost_distribution: CostDistribution | None = None#