Predict spatial interaction based on pre-trained model
Usage
si_predict(
od,
model,
constraint_production,
constraint_attraction,
constraint_total,
output_col = "interaction",
...
)
Arguments
- od
A data frame representing origin-destination data, e.g. as created by
si_to_od()
- model
- constraint_production
Character representing column in
od
. This argument, when set, ensures that the outputs are 'production constrained': the total 'interaction' (e.g. n. trips) for all OD pairs is set such that the total for each zone of origin cannot go above this value.- constraint_attraction
Character representing column in
od
. This argument, when set, ensures that the outputs are 'attraction constrained': the total 'interaction' (e.g. n. trips) for all OD pairs is set such that the sum of trips to destination is equal to the mean value per destination.- constraint_total
Single number representing the total interaction. This argument, when set, ensures that the sum of the interaction calculated will equal the value given.
- output_col
Character string containing the name of the new output column.
"interaction"
by default.- ...
Arguments passed to
fun