laser.measles.mixing.stouffer
stouffer
StoufferMixing(scenario=None, params=None)
Bases: BaseMixing
Stouffer intervening-opportunities migration model.
Long-distance travel is suppressed by the cumulative population of patches between origin and destination (intervening opportunities):
\[M_{i,j} = k \, p_i^{a} \sum_j \left(\frac{p_j}{\sum_{k \in \Omega(i,j)} p_k}\right)^{b}\]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scenario
|
DataFrame | None
|
Patch data. |
None
|
params
|
StoufferParams | None
|
Model parameters. Uses
|
None
|
Examples:
1 2 3 4 5 6 7 | |
The include_home model parameter is configured via StoufferParams.
get_migration_matrix()
Compute the Stouffer migration matrix.
Returns:
| Type | Description |
|---|---|
ndarray
|
Migration matrix of shape |
StoufferParams
Bases: BaseModel
Parameters for the Stouffer migration model.
Attributes:
| Name | Type | Description |
|---|---|---|
include_home |
bool
|
Whether to include home in the migration matrix |
k |
float
|
Scale parameter (avg trip probability) |
Examples:
1 2 3 | |