<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Predicting EV parking behaviour in shared premises</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Vinicius Monteiro de Lira</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fabiano Pallonetto</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Lorenzo Gabrielli</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Chiara Renso</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute of Information Science and Technologies, CNR</institution>
          ,
          <addr-line>Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>School of Business, Maynooth University</institution>
          ,
          <addr-line>Kildare</addr-line>
          ,
          <country country="IE">Ireland</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The global electric car sales continued to exceed the expectations climbing to over 3 millions and reaching a market share of over 4%. However, uncertainty of generation caused by higher penetration of renewable energies and the advent of Electrical Vehicles (EV) with their additional electricity demand could cause strains to the power system, both at distribution and transmission levels. The present work fits this context in supporting charging optimization for EV in parking premises assuming a incumbent high penetration of EVs in the system. We propose a methodology to predict an estimation of the parking duration in shared parking premises. The final objective is estimating the energy requirement of a specific parking lot, evaluate optimal EVs charging schedule and integrate the scheduling into a smart controller. We formalize the prediction problem as a supervised machine learning task to predict the duration of the parking event before the car leaves the slot. We test the proposed approach in a combination of datasets from 2 diferent campus facilities in Italy and Brazil. The overall results of the models shows an higher accuracy compared to a statistical analysis based on frequency, indicating a viable route for the development of accurate predictors for sharing parking premises energy management systems.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Electrical Vehicles</kwd>
        <kwd>Parking Prediction</kwd>
        <kwd>Machine Learning</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>an estimation of the parking duration in shared parking
premises. This is essential for estimating the energy
reThe advent of Electrical Vehicles (EV) are in increasing quirement of a specific parking lot, evaluate optimal EVs
spreading in our society. According to MCkinsley re- charging schedule and integrate the scheduling into a
port1 in our society EV sales rose 65 percent from 2017 smart controller.
to 2018 and Europe has seen the strongest growth in The specific behaviour of parking lots of campuses
refEVs. According to the report "The European Union’s ereed to EV charge is peculiar since it substantially difers
new emissions standard—95 grams of carbon dioxide per from the general parking lots available in the streets. In
kilometer for passenger cars—could also boost EV sales campus-like facilities (Universities, large industries, etc)
because it stipulates that 95 percent of the fleet must we can observe regular patterns of parking behaviour
meet this standard in 2020 and 100 percent in 2021". A that mainly include staf working hours besides a part of
race for larger batteries among manufacturer is leading other visitor [1]. This can be an advantage when trying
the current EV technology, and going forward it appears to predict general behavioral patterns of parking habits
that as batteries technology improve, they are going to and thus reach an optimal recharge plan for EVs.
replace motor fuel vehicles. The concerns as we move to The current work can become part of an overall
deEVs is that, firstly, there will not be enough charge points sign of a smart charging energy management system to
to meet consumer demand and, secondly, this additional optimally integrate the distributed energy systems and
load on the electricity grid will cause partial and total EVs into the power grid by developing a parking
predicfailure of specific electrical plant due to overloading. The tion module to estimate the vehicles’ parking time using
present work fits this context supporting optimization for machine learning algorithms.</p>
      <p>EV charging and assuming a incumbent high penetration Given this context, the specific objective of this work is
of EVs in the system. We propose an approach to predict to predict the duration of each parking event in a
campuslike parking lot, where the parking event is the moment of
Proceedings of the Workshop on Big Mobility Data Analytics (BMDA) the actual parking action of a car in a slot. In other words,
co-located with EDBT/ICDT 2023 Joint Conference (March 28-31, at the moment the car is parked in a slot, we predict how
2023), Ioannina, Greece long this car will stay parked so that the change can be
$ viniciusmonteirodelira@isti.cnr.it (V. M. d. Lira); optimized. This will allow the energy management
syslfoabreiannzoo..pgaabllroineelltit@o @istmi.cun.ire.it(F(.LP.aGllaobnreietltloi));; chiara.renso@isti.cnr.it tem to decide when to start the actual charge based on
(C. Renso) the prediction. For example, assuming several cars arrive
CPWrEooUrckReshdoinpgs IhStpN:/c1e6u1r3-w-0s.o7r3g ©CCo2Em02mU2oCRnospLWyicreiognhsrtekfAostrthrtihboiusptpioanpPe4rr.0obIynctietesrenaaduttiihononragsl.s(CUCs(eCBpYEer4mU.0i)tR.te-d WundSe.roCrregat)ive aatn9d AthMer, eiffowree dwoen’sttkarntocwhahrogwinmguimchmtheedicaatrelsyt,aythpisarwkeildl
1https://www.mckinsey.com/industries/automotive-and- cause a peak of electricity demand. On the contrary, if we
causssehmiobnlsy-/ao-ugrlo-ibnasli-gphlutsn/gmec-ikni-nesve-ysa-elelesc#tric-vehicle-index-europe- predict that a given car stay parked e.g. 8 hours, then we
can delay the charge of this car to a later moment trying therefore predict the subsequent parking availability
comto flatten the peaks. We formalize the prediction prob- bining a matching-based allocation strategy to assign
lem as a supervised machine learning task that, given a users to selected parking spaces.
parking event at a given time, tries to predict the dura- Deep learning to predict parking occupancy is
protion of the parking event. We structure our experiments posed by many papers in the literature. Paper [5] adopts
inspired by the research questions: RQ: How accurately a deep learning model for predicting block-level
parka supervised machine learning approach can predict the ing occupancy 30 min in advance in paper. The model
duration of a parking event in a campus-like parking lot? takes multi-source data as input, e.g., parking, trafic and
We experiment diferent algorithms and features combi- weather.
nation into 5 datasets from 2 diferent campus facilities Paper [6] proposes a Convolutional Neural Network
in Italy and Brazil. We show that using both contextual (CNN) model for block-level parking occupancy
predicand time of the day features, the overall results of the tion extracting spatial relations of trafic flow combined
models shows an higher accuracy compared to a statisti- with a LSTM autoencoder to capture temporal
correlacal analysis based on frequency, indicating a viable route tions. Clustering is also considered in the Clustering
for the development of accurate predictors for sharing Augmented Learning Method (CALM) to learn deep
feaparking premises energy management systems. ture representations of spatio-temporal data obtained</p>
      <p>Structure of the paper follows. Section 2 discusses using the proposed embedding.
some related works an how this approach diferentiates A deep learning approach is also proposed by [7],
from them. Section 3 introduces the problem definition called Du-Parking. This approach models temporal
closeand clarifies the prediction problem formulation. Section ness, period and current general influence employing
4 reports the details of the experimental evaluation. Fi- long short-term memory (LSTM) to model the temporal
nally, Section 5 draws the conclusions and envisage some closeness and period. This approach learns to
dynamifuture works. cally aggregate the output to estimate the final parking
availability of given parking lot.</p>
      <p>Compared to the above approaches the novelty of our
2. Related Works method lies in the fact that we do not aim at predicting
the next free slot neither to suggest the driver where to
park. On the contrary, we predict how long the car will
stay parked in a given slot and this prediction is computed
at the specific time the car start the parking, which is a
diferent problem. While the first problem requires to
train a learning system to predict which slots - in a given
area at a given time - will be free, this problem, given a
specific slot and a specific starting time of the parking
of a vehicle, predicts how long the car will stay parked.</p>
      <p>The energy management system can therefore allocate
the energy to the parking slot charging station based on
this prediction: charging later in time vehicles which are
predicted to stay longer and accelerate the charging for
cars which are predicted to stay shorter.</p>
      <p>Most of the recent works in the literature focuses on
predicting which parking lot will be free at the arrival
of the car. This is motivated by the challenge of finding
a parking space in urban areas. It has been reported2
that 30% of trafic congestion is caused by travelling for
ifnding parking spaces, bringing unnecessary energy
consumption and environmental pollution. Works in this
area include the of-street (parking slots in private areas)
and in-street variants (slots in the streets). A pioneering
paper by [2] proposes the real-time availability forecast
algorithm to predict parking facility availability in real
time using combined current (on-line) and historical
information. This work uses an algorithm operating with
mixed real and simulated information.</p>
      <p>A recent paper by Zeng et al ([3]) proposes a hybrid
model that stacks gated recurrent unit (GRU) and
longshort term memory (LSTM). The GRU-LSTM model
combines LSTM’s advantage in prediction accuracy and GRU’s
advantage in prediction eficiency. Furthermore, similar
to us, it uses multi factors, including occupancy, weather
conditions and holiday, as input to predict parking
availability.</p>
      <p>In paper [4] authors develop a prediction model based
on Naive Bayes and machine learning methods like
decision tree, random forest, and regression analysis for
building the prediction model of parking occupancy and</p>
    </sec>
    <sec id="sec-2">
      <title>3. The parking duration prediction problem</title>
      <p>The objective of our approach is to exploit historical
data on parking usage and additional contextual data like
weather conditions and parking lot occupancy levels, to
predict the duration of a parking slot occupancy.
Diferently from many state of the art approaches that want
to predict if a giving parking lot will be free in a next
period of time [2, 4], here we focus on the prediction of
the temporal duration of the occupancy of a car in a slot.</p>
      <p>We recall that our approach, to be suitably integrated
with an Energy Management System, focuses on specific
2https://www.accessmagazine.org/spring-2011/free-parkingfree-markets/
parking context that we call of shared premises (e.g. park- to define a function  (_, ) =  where the class 
ing lots of universities, workplaces, supermarkets, etc), represents a temporal interval such that  ⊆ .
not focusing on fee-based street parking. Overall, our
approach can be applied to any parking environment where
there is a tendency for the car to stay parked a minimum
amount of time and where the electrical charge system
of the parking lots can be integrated into the controller
of the Energy Management System. We also recall that
our approach is driver-profile agnostic due to privacy
reasons.</p>
      <p>It is worth noticing that the parking behaviour in a
campus-like facility reflects a diferent parking behaviour
compared to fare-based streets parking lots since here
the duration is expected to be longer than on street
parking.Furthermore, the premises have usually a controlled
access and the energy management system can
therefore optimise the electricity supply based on the parking
occupancy, while is not always true in fare-based street
parking.</p>
      <p>Given a parking area, a car parking event represents
an event where a driver parks at a given timestamp in
one of the available slots. The vehicle stays parked for
a certain temporal duration until it leaves the slot. It is
assumed that the vehicle can be charged while parked.</p>
      <p>The charging time can start as soon as the car arrives, or
can start later on, or again, can start, interrupt and start
again.</p>
      <sec id="sec-2-1">
        <title>We can observe that our target variable  represents</title>
        <p>ordinal categories. An ordinal variable is a categorical
variable, where there is a clear ordering of the categories.</p>
        <p>For example, our variable could assume ordinal categories
like: short, medium or long duration. In the next section,
we introduce the details of the Machine Learning (ML)
approach to solve the Car Parking Duration Prediction
Problem.</p>
        <p>We propose to use supervised machine learning
approaches to predict the parking duration based on an
historical dataset of car parking events and contextual
features.</p>
        <p>The learning task is based on a three types of features:
single event-related, spatial and contextual features. The
event-related features represent the features that we can
extract directly from the sets of parking events like the
time of the parking event or the weather conditions. The
spatial features are based on the location of the parking
slots inside the car parking area, while the contextual
features representing the occupancy of the diferent zones
of the parking area. We explain how we have extracted
some spatial and contextual features that are used in our
predictive models. All these features are combined to feed
the proposed supervised machine learning algorithms
(Section 4).</p>
        <p>Recalling Definition 2, a car parking event is defined
Definition 1 (Parking Slot). Given a parking area in
shared premises, we define a parking slot  as a tuple
 =&lt; , ,  &gt;, where  represents the parking slot
identifier, and  and  represent its spatial coordinates in
the parking area. A parking slot is the actual place where
drivers park their cars. In our application scenario, each
slot can be equipped with a charge station where the car
can be recharged. The set of all the parking slots form the
parking area.
by the tuple  =&lt; , ,  &gt; and given  and
 we want to predict the temporal duration . From
the timestamp , we derive three features: the day of
week , hour of the day ℎ, and the minutes  rounded
to 5 minutes. The motivation of these temporal features
is to enable the predictive model to learn the correlation
between the time when the car parks and the relative
parking temporal duration. We also include in this
category of features the weather condition  at the moment
Definition 2 (Car Parking Event). We define a car park- of the car parking event starts, , using this as extra
ing event  as a tuple  =&lt; , ,  &gt;, where  information to feed the predictive models.
represents the parking slot identifier where the car is parked, Many studies have been made toward the
understand represents the timestamp indicating when a car has ing of parking behavior and the mechanism of people’s
started the parking and  is the temporal duration of the parking decisions [8, 9, 10, 11]. It has been observed that
car park until it leaves the slot. some spatial aspects can bias the occupancy of a parking
lot and choose the parking areas close to the destination
We want to predict the parking duration  of a car
but also investigated the impact of the trees in parking
parking event , given a  and the parking event lots.
starting time . This prediction is modelled as a Motivated by these aspects, our approach focus on
classification problem where the objective is to assign,
the spatial distribution of the parking slots. For this
for each car parking event , a class representing the
reason, we split the whole parking lot into smaller areas
predicted duration interval. More formally, we have the
using diferent clustering approaches. Then, we include
following definition of the problem.
these spatial features in our predictive models to learn
Definition 3 (Parking Duration Prediction Problem). if a parking area can correlate with the slot occupancy
Given a parking event  where it is known the slot identifier duration.
_ and the start time  but not duration , we want More formally, given a set of parking slots (0, ..., ) ∈
4. Experimental evaluation
, we use the spatial coordinates of each  to create the
spatial clusters (1, 2, .., ) of parking slots, where
 ≤ . We have used two clustering algorithms for this In this section we evaluated the proposed approach for
task: DBScan ([12]) and K-Means ([13]). Thus, when predicting the parking duration by exploiting historical
training our predictive models over the the dataset of parking data.
historical car parking events, we add as input feature a The research question driving our experiments is the
representation of the cluster where the parking slot  following:
belongs to. RQ: How accurately a supervised machine learning
ap</p>
        <p>Another aspect that we investigate for the parking proach can predict the duration of a parking event in a
duration prediction is the context. In our case the context campus-like parking lot?
is represented by the status of occupancy of the slots in This research question guides our first experiments.
the spatial clusters and the relationship of this occupancy Here, we compare the performance results of our
mawith the duration of a given parking event. chine learning based approach against several baselines.</p>
        <p>Specifically, we want to discover if the occupancy sta- We also investigate diferent machine learning approaches
tus of an area (e.g 100%, means totally full, while 0% to tackle this problem as a supervised task: Classification,
totally empty) where a driver parks, has a correlation Ordinal Regression, and Regression. We use diferent
with the parking duration. features including the description of the occupancy of</p>
        <p>The contextual features therefore represent the sta- the parking lot at the time the parking event starts and
tus of occupancy of the diferent areas (i.e. the spatial the spatial distribution of the parking areas.
clusters) of the parking. In other words, to predict the
duration of a given car parking event , we also con- 4.1. Experimental Setup
sider as input feature the level of occupancy of the spatial
clusters (1, 2, .., ) at the time of the event. Datasets. We selected two public datasets of parking</p>
        <p>More formally, we define a function called  occupancy in campus-like parking lots: PKlot [14] and
that given a  and the timestamp  of a parking CNRPark [15]. Both datasets contain the occupancy
inevent , creates a vector (1 , 2 , ..,  ) by comput- formation detected by video cameras for each slots of
ing the occupancy level of all parking spatial clusters parking areas of two academic institutions: the research
(1, 2, .., ) at time . The occupancy status  area of the National Research Council of Pisa3, in Italy
of each spatial cluster  is basically the ratio between and the parking area of the two Brazilian universities.
the number of occupied slots at the timestamp  and In both cases the whole parking lot is split in diferent
the number of slots in that cluster. parking areas with a variable number of parking slots.</p>
        <p>In Figure 1, we illustrate the spatial and contextual In both datasets, a car parking event occurs when a car
features. At the top, we can see images from three dif- parks in a parking slot of the area. In this case, the event
ferent car parking lots. In the middle, the dots represent starts at the timestamp of the frame that detects a car in
the pixel coordinate of the parking slots. The colors of the slot. The car parking event ends at the timestamp
each dots is a representation of the spatial features which of the frame showing: (1) an empty parking slot, or (2)
indicates the cluster (sub-area) of each parking slot. a diferent car parked in the same slot. The duration of</p>
        <p>In the bottom we illustrate the contextual occupancy the parking event is then computed as the diference of
features. The color represents the spatial cluster of each the timestamps of the two image frames, the start and
slot. At the bottom, we have the occupancy status in the end. The CNRPark dataset contains images collected
percent of the spatial clusters 1, 2, 3, and 4 at a given from November 2015 to February 2016 for a total of 23
time . monitored days. The parking lot has been monitored by</p>
        <p>To summarize, in this section we introduced three new 9 cameras covering the parking area of the Pisa National
categories of features: event-related, spatial and contex- Research Council south parking area. The
meteorologtual. The event-related features are extracted from the ical conditions at the moment of the frame capture has
parking event, the spatial features are computed by us- also been collected. This dataset contains a total of 4081
ing cluster techniques over the spatial distribution of the frames and 144,965 photos. In Table 1 we depict an
exparking slots while the contextual features are obtained cerpt of the CNRPark raw data.
by computing the occupancy status of the spatial clusters. The change of cars in the monitored slots is also
de</p>
        <p>The overall idea is to investigate how to train the pre- tected and these statistics are reported in Table 2 for the
dictive models using diferent information that might CNR dataset. We see the day of the week, the number of
have a predictive power on the parking duration. In the changed cars (the end of a parking event) and the total
next section we detail the experimental setting and re- number of days for which we have actual images. We
sults on exploiting these features in a machine learning
task for predicting the parking duration of a given event. 3http://www.area.pi.cnr.it
also notice, as expected, how the number of car changes
during the week end is very low.</p>
        <p>The PKlot dataset contains the occupancy information
for each slot of the parking areas of two academic
institutions: (1) the Federal University of Parana (UFPR) and
(2) the Pontifical Catholic University of Parana (PUCPR),
both located in Curitiba, Brazil. The dataset includes a
total of three diferent parking lots represented by PUCPR,
UFPR04, and UFPR05. The occupancy information is
detected by a number of cameras taking images of the
parking slots and detecting the change of the car or the
slot becoming empty. This dataset contains 12.417 images
captured in three diferent parking areas with diferent
weather conditions for a total of 168 slots in the period
between 11 September 2012 and 16 April 2013. Specifically,
dataset PUCPR has 100 parking slots, UFPR04 has 28 and
UFPR05 has 45 slots. PKLot is larger than CNRPark and
contains images spanning across months.</p>
        <p>Data Cleaning. A detailed analysis on the image
frames reveals the presence of missing data for some
hour of the day (e.g. due to a broken device or during
night hours due to the lack of infrared vision). When a
parking event is starting or ending during the missing
temporal interval, it has been flagged as partial and
filtered out to avoid training inconsistencies. Additionally,
we filter out the days when the number of detected slots
is lower than 50% of the total slots. In total, after the data
cleaning CNRPark counted 3552 parking events, PUCPR
4291 parking events, UFPR04 1204 parking events and
UFPR04 2148 parking events.</p>
        <p>Target Classes. We have considered the following 3
classes for the predictive variable (i.e. the car parking
event duration) with discrete values in minutes: ℎ ≤
60, 60 &lt;   ≤ 240,  &gt; 240; Table 4 show the
normalized distribution of the car parking events.</p>
        <p>Long
. We use diferent feature combinations to train the
models: (1) Single event-related feature where we train
the model using only one event-related feature; (2) All
event-related features together where we train the model
using all single event-related features at once. We refer to
 when we use all the event-related features to train the
ML model. For both cases, we perform two further
combinations: using and not using the spatial and occupancy
features to feed the models.</p>
        <p>Hyper parameters. We use a grid search to tune the
hyperparameters of the algorithms [16]. Specifically: For
Figure 2: Distribution of occupancy of the parking lots of XGB, AB and RF, we vary the number of trees in the
PKLot (CNR, omittted due to lack of space, has similar figures) range of {50, 100, 150}, while maximum tree depth vary
in the ranges of {2,3, or until all leaves are pure},
respectively; For SVM, we use the RBF kernel with  varying</p>
        <p>Training Approaches. Given the ordinal characteris- in {0.0001, 0.001, 0.01}. For the LR, we have used two
tic of our target variable, we have explored three super- diferent class weight parameter {balanced and uniform},
vised approaches to train the predictive models over the while the multi class parameter changing between {auto,
training set. For each approach, the best model is selected ovr (for binary classification)}. For the K-means, the 
taking into account the average results over the 5 folds varies in the ranges of {2, 3,4,5,6}. While for the DBScan
of validation. These approaches are: (a) Classification: ranges are {50, 75, 100, 125, 150} and {2,3,4} for the  and
the training is performed without taking into account minimum sample, respectively.
the order of the classes and the selected model is the one Baselines. To be able to evaluate the performance
with highest micro-fscore; (b) Regression: the training is of our approach we have used the following baselines:
executed to reduce the mean square error (MAE) of the (a) Random: randomly choose a class; (b) Longest Class:
predicted values, therefore the model with lowest error always select the longest interval; (c) Shortest Interval:
is selected. always choose the shortest interval; (d) Majority Class:</p>
        <p>Algorithms. For the Classification and Regression always choose the class with highest frequency in the
tasks we used the following algorithms: Random For- training data. For regression, we compare with the (e)
est (RF), XGBoosting (XGB), AdaBoosting (AB), Logistic Linear Regression (LN). Naive Bayes and Linear
RegresRegression (LR) and Support Vector Machine (SVM). To sion are both simple ML models with high bias. They are
compute the spatial features, we have used the K-means used here as baselines given their easy interpretation.
and the DBScan clustering algorithms. For all algorithms, ML model training process. For each dataset, we
we used the implementation available in the scikit-learn split the car parking events into train and test with 0.8 and
library4. 0.2 ratio respectively without shufle the data. To avoid</p>
        <p>Features. The following features are extracted and data leakage, we ordered the car parking events using
used to feed the ML algorithms. The event-related fea- their timestamps before split. When training the models
tures include hour of the day ℎ, time stamp minutes , on the training data, we use a stratified cross-validation
day of week , slot id , and weather condition ; with 5 folds. After the training, for each algorithm, the
the spatial features include the spatial cluster id ; the best configuration of hyper-parameters is used to retrain
occupancy features include the spatial cluster occupancy the model using the whole training data and then assess
its performance now using the test set.</p>
        <p>Evaluation metrics. To evaluate the experiment re- f1_macro are also recorded in the PUCPR dataset using
sults we have used the following measures: micro f1- the classification task. Moreover, we observe that the use
score ( 1), macro f1-score ( 1) and mean of the spatial and occupancy features in most of the cases
absolute error (MAE). We recall that the F1 score is a (16 out of 24) has improved the performance of the ML
weighted average of the precision and recall where best models.
value is 1 and worst is 0. The micro f1-score is a metric Altogether, these analysis show an consistent
advanwhere we compute an F1 score counting the total true tage in the use of low bias ML models such as the XGB
positives, false negatives and false positives. The macro to predict parking event duration due to the implicit
ranf1-score is a metric that treats all classes equally, then domness and non-linearity of such events.
it does not take label imbalance into account. Indeed, Both classification and regression algorithms produce
the macro-average computes the metric independently a similar performance for long term parking; however,
for each class and then take the average, hence treating classification is more accurate on the short term
forecastall classes equally, whereas the micro-average will ag- ing while regression has an overall lower mean average
gregate the contributions of all classes to compute the error in the medium range. The parking prediction
modaverage metric. These measures give some clues about ule based on classification could provide a better user
the precision and recall of the models on predicting the experience to drivers because accurate identification of
true positives. By using the MAE we want to have a short-term parking will force the controller to guarantee
more interpretative measure of our regression models a higher energy share to short-term park events.
Howsince it computes the average error of the predictions ever, it will reduce the peak shaving capabilities of the
values (ˆ) compared to the real values (). For all ex- parking area. On the other hand, a regression model
periments, we consider the MAE obtained over the test could facilitate demand response measures because of
set as comparison criteria between the models. forecasted parking events shifted towards long parking
time.
4.2. RQ: Accuracy of ML in predicting</p>
        <p>parking duration</p>
      </sec>
      <sec id="sec-2-2">
        <title>In this section we address our research question - study</title>
        <p>ing the accuracy of our car parking event duration
prediction models. At this first study, we analyse the
performance of each ML approach (  and
) when predicting parking events duration.</p>
        <p>Table 5 report the MAE, micro f1-score and macro
f1score of the models. The MAE was used as comparison
criteria to select the best models. For each dataset and
ML approach pairs, the table indicate the strongest
baseline and report the results of the best ML models for
two set of features: (a) using only event-related features,
represented as {ℎ,,,,,}, having no spatial
and occupancy features; and (b) using event-related
features with spatial and occupancy features, represented as
{,}. The table also report the improvement in
percentage achieved by the ML models over the baselines.</p>
        <p>We highlight in bold the best MAE result per dataset. Acknowledgements</p>
        <p>From the results, we can observe that the ML
models overcome the baselines in all the datasets, for all The work is supported by the ERA-NET Smart Energy
the training approaches. Specially the ensemble trees System, Sustainable Energy Authority Ireland and Italian
models (RF and XGB) show the best results in most of Ministry of Research with project EVCHIP N.
ENSGPLUSthe training approaches with XGB showing the best per- REGSYS18_00013. and GA 19/RDD/579-EVCHIP.
formance. For all datasets, when using a 
approach, we observe that the most robust baseline is
the Linear Regression (LN), whereas for the approaches References
  the strongest baseline is the Gaussian [1] U. Duda-Wiertel, A. Szarata, The analysis of
Naive Bayes (GNB). In Table 5 the best MAE performance transport-related behaviours of drivers in highly
(0.316) is reached by classification with XGB when
predicting over the PUCPR dataset. The best f1_micro and</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>5. Conclusions and Future Works</title>
      <sec id="sec-3-1">
        <title>The growing penetration of EVs with larger battery size</title>
        <p>challenges the distribution network’s capacity, and it is
becoming a threat to the grid’s reliability. The use of EV
batteries as flexible energy storage opens up several
research questions on integrating charging vehicles with an
Energy Management System. Such a system requires
implementing a parking occupancy prediction module,
proposed in this paper, based on historical data to forecasting
the parking duration for each parking slot. We evaluated
various machine learning algorithms across four
diferent parking datasets to predict parking behaviour in this
context. Future works include the improvement of the
current performance results with finer prediction
intervals and more classification options.
CNR
PUCPR
GNBℎ
GNBℎ</p>
        <p>Algorithm
RFℎ
XGB,
SVM
SVM
XGBℎ
XGB,
RF
RF,
RFℎ
XGB,
XGB
XGB,</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <article-title>occupied paid parking zones</article-title>
          ., Advances in Trans- [9]
          <string-name>
            <given-names>G.</given-names>
            <surname>Antolín</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ibeas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Alonso</surname>
          </string-name>
          , L. dell'Olio, Mod-
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <source>portation Studies</source>
          <volume>47</volume>
          (
          <year>2019</year>
          )
          <fpage>35</fpage>
          -
          <lpage>48</lpage>
          . elling parking behaviour considering users hetero[2]
          <string-name>
            <given-names>F.</given-names>
            <surname>Caicedo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Blazquez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Miranda</surname>
          </string-name>
          , Prediction geneities,
          <source>Transport Policy</source>
          <volume>67</volume>
          (
          <year>2018</year>
          )
          <fpage>23</fpage>
          -
          <lpage>30</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <article-title>of parking space availability in real time</article-title>
          ,
          <source>Expert</source>
          [10]
          <string-name>
            <given-names>X.</given-names>
            <surname>Ma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>He</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Chen</surname>
          </string-name>
          , Parking choice be-
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          <source>Systems with Applications</source>
          <volume>39</volume>
          (
          <year>2012</year>
          )
          <fpage>7281</fpage>
          -
          <lpage>7290</lpage>
          . havior investigation:
          <source>A case study at beijing lama</source>
          [3]
          <string-name>
            <given-names>C.</given-names>
            <surname>Zeng</surname>
          </string-name>
          , C. Ma,
          <string-name>
            <given-names>K.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Cui</surname>
          </string-name>
          , Parking occu- temple,
          <source>Procedia-Social and Behavioral Sciences 96</source>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <article-title>pancy prediction method based on multi factors (</article-title>
          <year>2013</year>
          )
          <fpage>2635</fpage>
          -
          <lpage>2642</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <article-title>and stacked gru-lstm</article-title>
          ,
          <source>IEEE Access 10</source>
          (
          <year>2022</year>
          ). [11]
          <string-name>
            <surname>D. D. Milošević</surname>
            ,
            <given-names>I. V.</given-names>
          </string-name>
          <string-name>
            <surname>Bajšanski</surname>
            ,
            <given-names>S. M.</given-names>
          </string-name>
          <string-name>
            <surname>Savić</surname>
            , Influence [4]
            <given-names>E. H.-C.</given-names>
          </string-name>
          <string-name>
            <surname>Lu</surname>
          </string-name>
          ,
          <string-name>
            <surname>C.-H. Liao</surname>
          </string-name>
          ,
          <article-title>Prediction-based parking of changing trees locations on thermal comfort on</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <source>ternational Journal of Geographical Information urban greening 23</source>
          (
          <year>2017</year>
          )
          <fpage>113</fpage>
          -
          <lpage>124</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <source>Science</source>
          <volume>34</volume>
          (
          <year>2020</year>
          )
          <fpage>1873</fpage>
          -
          <lpage>1901</lpage>
          . [12]
          <string-name>
            <given-names>M.</given-names>
            <surname>Ester</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.-P.</given-names>
            <surname>Kriegel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Sander</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Xu</surname>
          </string-name>
          , A density[5]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Mei</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>Real-time based algorithm for discovering clusters in large</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <article-title>multistep prediction of public parking spaces based spatial databases with noise</article-title>
          ,
          <source>in: KDD</source>
          , AAAI,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          <article-title>on fourier transform-least squares support vector</article-title>
          [13]
          <string-name>
            <surname>J. B. MacQueen</surname>
          </string-name>
          , Some methods for classification
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <source>Systems</source>
          <volume>24</volume>
          (
          <year>2020</year>
          )
          <fpage>68</fpage>
          -
          <lpage>80</lpage>
          . ceedings of 5-th Berkeley Symposium on Mathe[6]
          <string-name>
            <given-names>S. S.</given-names>
            <surname>Ghosal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Amrouss</surname>
          </string-name>
          , I. El Hallaoui, matical Statistics and Probability,
          <year>1967</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <article-title>A deep learning approach to predict parking occu-</article-title>
          [14]
          <string-name>
            <surname>P. R. De Almeida</surname>
            ,
            <given-names>L. S.</given-names>
          </string-name>
          <string-name>
            <surname>Oliveira</surname>
            ,
            <given-names>A. S. Britto</given-names>
          </string-name>
          <string-name>
            <surname>Jr</surname>
            ,
            <given-names>E. J.</given-names>
          </string-name>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          <source>in: 2019 International Conference on Data Mining parking lot classification, Expert Systems with Ap-</source>
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <string-name>
            <surname>Workshops</surname>
          </string-name>
          (ICDMW),
          <year>2019</year>
          , pp.
          <fpage>581</fpage>
          -
          <lpage>586</lpage>
          . plications 42 (
          <year>2015</year>
          )
          <fpage>4937</fpage>
          -
          <lpage>4949</lpage>
          . [7]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Rong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Yan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Ma</surname>
          </string-name>
          , Du-parking: Spatio- [15]
          <string-name>
            <given-names>G.</given-names>
            <surname>Amato</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Carrara</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Falchi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Gennaro</surname>
          </string-name>
          , C. Vairo,
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          <article-title>ability, in: Proceedings of the 24th ACM SIGKDD era networks and deep learning</article-title>
          , in: IEEE Sympo-
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          <source>International Conference on Knowledge Discovery sium on Computers and Communication</source>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          <string-name>
            <given-names>and Data</given-names>
            <surname>Mining</surname>
          </string-name>
          , ACM,
          <year>2018</year>
          , p.
          <fpage>646</fpage>
          -
          <lpage>654</lpage>
          . [16]
          <string-name>
            <given-names>J. S.</given-names>
            <surname>Bergstra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Bardenet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Bengio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Kégl</surname>
          </string-name>
          , Algo[8]
          <string-name>
            <given-names>F.</given-names>
            <surname>Zong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Yu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Tang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <article-title>Understanding park- rithms for hyper-parameter optimization</article-title>
          , in: Ad-
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          <string-name>
            <surname>Physica</surname>
            <given-names>A</given-names>
          </string-name>
          :
          <string-name>
            <surname>Statistical</surname>
            <given-names>Mechanics</given-names>
          </string-name>
          <source>and its Applica- 2011</source>
          , pp.
          <fpage>2546</fpage>
          -
          <lpage>2554</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          <source>tions 523</source>
          (
          <year>2019</year>
          )
          <fpage>408</fpage>
          -
          <lpage>417</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>