There are two types of forecast models: Model without regression and Regression models. For each type of models, we both use time and space discretization. The time discretization is given by time windows of 30 mins while the user can choose among 3 different discretizations denoted by Rect 10 (regular space discretization into 10x10=100 rectangles), Uber 7 (provided by Uber discretization library with scale parameter 7), and District (the districts of Rio de Janeiro). There are four sections: Line plot for the number of emergency calls, heatmap of the mean number of emergency calls, and empirical distributions of the number of calls (histograms).
The region under study is partitioned into a set of zones. Different zones may have different shapes, sizes, and other attributes. For the basic model described here, it is assumed that arrival rates vary over time according to the time of the week. Time during the week is partitioned into a set of time intervals. The model may impose constraints on the differences between arrival rates in different time intervals. For example, it may be required that the arrival rate during [8:00,8:30) on all weekdays be the same, or be close to each other. To facilitate such constraints, partition into a collection of subsets. For example, may be Monday [8:00,8:30); Tuesday [8:00,8:30); Wednesday [8:00,8:30); Thursday [8:00,8:30); Friday [8:00,8:30). There are a variety of classification systems for emergency calls, including ICD-10, ICD-11, MPDS, and APCO. Let denote the set of arrival classes.
For each , , and , let denote the number of observations for arrival class in zone during time interval , and let these observations be indexed .
For each , , , and , let denote the number of arrivals for observation of arrival class , zone , and time interval , and let denote the total number of arrivals over all observations for arrival class , zone , and time interval .
Assume thatare independent Poisson distributed random variables. Denoting by the mean number of calls per time unit (say an hour)for time interval arrival class and zone and by the duration (in time units) of time interval , is Poisson with parameter (mean) . We calibrate the intensities solving with objective given by for some weights .
Each arrival class , zone , and time interval may have covariates, and can be modeled as a function of these covariates. For each ,, and , let denote the covariate values of class , zone , and time interval . Then consider the model where are the model parameters. To facilitate such a model, let denote the total number of observations, and let these observations be indexed . For each observation , let denote the number of arrivals for observation and let denote the covariate values of observation . Typically will indicate the class of emergency, the zone, the time interval, and other covariates used to explain the number of arrivals . Then the negative log-likelihood function is given by .
We calibrate maximizing the likelihood. We use as regressors the areas of the different land types (add a filter to choose the SAMU and show the corresponding heatmap of land types), the population, and holidays.