Challenge


The response time is one of the most important factors for emergency services because their ability to save lives and rescue people depends on it.
A non-optimal choice of an emergency vehicle for a rescue request may lengthen the arrival time of the rescuers and impact the future of the victim. This choice is therefore highly critical for emergency services and directly relies on their ability to predict precisely the arrival time of the different units available.

NB: Any use of the image or name of the Paris Fire Brigade is subject to authorization from the Paris Fire Brigade.
  • Challenge opening date: 8 July 2019
  • Challenge closing date: 31 December 2020
Page content

Challenge

This challenge is hosted by the Ecole Normale Supérieure (ENS) data platform.
For this challenge you will have to predict the response times of the Paris Fire Brigade vehicles.
The response times of the Paris Fire Brigade vehicles is the delay between:
This measurement is composed by the 2 following periods of time: A first solution published!
A first solution from a challenger has been published on GitHub: https://github.com/ds4es/unit-response-oracle
It was not possible for us to wait any longer for the publication of this fabulous work.
We will as soon as possible enhance it with the contributions of other challengers who also agreed to share their work with us. Thanks to all of them very much for the work carried out and shared.

What is extraordinary with this type of challenge is that the multitude of minds leads to the design of a multitude of methods which when combined lead us to an amazing solution that would have not been possible to reach with the involvement of only one mind.

Resources to consult for this challenge

Dataset description

Terms and conditions of data usage:

The dataset covers the entire year 2018 for which inoperable data have been squeezed out.

Training data (219337 lines):
Test data (108033 lines): Supplementary files:
Following the request of one of the challengers and facilitate the exploitation of GPS tracks for 30% of the dataset filled with this information, 2 "supplementary files" have been made available under the "Files" section of the ENS data challenge page.
Input parameters (x_train.csv and x_test.csv): Output parameters (y_train.csv and y_test.csv): Supplementary files (x_train_additional_file.csv and x_test_additional_file.csv):

External data sources potentially relevant

Starting script

The following script is aimed to be a starting point for the participants.
import pandas as pd
import pandas as pd
import numpy as np
from sklearn.preprocessing import PolynomialFeatures
from sklearn.linear_model import LinearRegression

# Data reading
x_train = pd.read_csv('./data/x_train.csv', sep=',')
y_train = pd.read_csv('./data/y_train.csv', sep=',')
x_test = pd.read_csv('./data/x_test.csv', sep=',')

x_train_transit = x_train[['OSRM estimated distance','intervention on public roads','floor']]
y_train_transit = y_train[['delta departure-presentation']]
x_test_transit = x_test[['OSRM estimated distance','intervention on public roads','floor']]

# Create a predictive model for the 'delta departure-presentation'
# based on 'OSRM estimated distance', 'intervention on public roads' and 'floor'
polynomial_features= PolynomialFeatures(degree=3)
x_train_transit_poly = polynomial_features.fit_transform(x_train_transit)
model = LinearRegression()
model.fit(x_train_transit_poly, y_train_transit)

# Prediction of the 'delta selection-presentation'
x_test_transit_poly = polynomial_features.fit_transform(x_test_transit)
y_selection_presentation_predicted = y_train['delta selection-departure'].median() + model.predict(x_test_transit_poly)

# Create a submission file
submission = pd.concat([pd.DataFrame(x_test[['emergency vehicle selection']].values), \
           pd.DataFrame(np.full((len(x_test), 1), y_train['delta selection-departure'].median())), \
           pd.DataFrame(model.predict(x_test_transit_poly)), \
           pd.DataFrame(y_selection_presentation_predicted)], \
           axis=1)

submission.columns = list(y_train.columns.values)

submission.set_index('emergency vehicle selection', inplace=True)

submission.to_csv('./submission.csv', sep=",")

#### Evaluation function ####
# from sklearn.metrics import r2_score
# 
# r2_score(observed_values,predited_values)
#############################