<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Analysis of delay patterns and correlations in railway traffic data</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Roland</forename><forename type="middle">Krisztián</forename><surname>Szabó</surname></persName>
							<email>rolandszabo@inf.elte.hu</email>
						</author>
						<author>
							<persName><forename type="first">Tomáš</forename><surname>Horváth</surname></persName>
							<email>tomas.horvath@inf.elte.hu</email>
						</author>
						<author>
							<persName><forename type="first">Ádám</forename><surname>Tarcsi</surname></persName>
						</author>
						<author>
							<affiliation key="aff0">
								<orgName type="department">Faculty of Informatics</orgName>
								<orgName type="institution">Eötvös Loránd University</orgName>
								<address>
									<settlement>Budapest</settlement>
								</address>
							</affiliation>
						</author>
						<author>
							<affiliation key="aff1">
								<orgName type="institution">Pázmány Péter stny</orgName>
								<address>
									<addrLine>1/C</addrLine>
									<postCode>1117</postCode>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Analysis of delay patterns and correlations in railway traffic data</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">FEA4313F88E2A140640A29E6029C34EF</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-25T08:52+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Traffic itself can be a huge challenge for most commuters regardless of the transportation method of their choice. For example, it is inevitable to experience delays and congestion during rush hours. All commute methods have their own specific characteristics when it comes to delays -cars and buses suffer from traffic jams and similar principles apply to railways as well. However, the causes of railway delays are not that straightforward and they need further investigation. According to our personal experiences most passengers are not aware of the reasons behind train delays even though they are usually encountered multiple times a day. In this paper I will present possible answers based on the data collected from the publicly available APIs of Hungarian State Railways over the past 1.5 years.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Datasets</head><p>The idea of the delay analysis and prediction originates from paper <ref type="bibr" target="#b0">[1]</ref> where a simpler version of this concept has been used as a module in a smart alarm clock application. During the development of the application multiple data sources were investigated, some of which turned out to be unusable. In this section the details of the selected data sources will be discussed.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.1">Traffic</head><p>I found that the most reliable publicly available data source for traffic is the official map of Hungarian State Railways <ref type="bibr" target="#b1">[2]</ref>, where all trains can be tracked in real-time. I have created a small automated script that runs on a virtual private server and takes a snapshot of the map approximately every minute and stores the result in a JSON file.</p><p>Traffic data have been being collected since January 2019, which means there are roughly 1 year and 6 months of available information (approx. 130 million records). Due to the COVID-19 outbreak a data freeze was applied at the end of March 2020 because of the extraordinary circumstances that affect transportation all over the world. Hungarian State Railways canceled lots of trains and only 30% percent of a train's capacity can be used in order to prevent the spread of the infectious disease. This new situation significantly alters the operation of the railway system which would have introduced a lot of noise to the existing dataset and it might not be relevant in a few months</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>at all. Should the pandemic be over its effects could be analyzed later on but currently it is out of scope of this paper.</p><p>A snapshot of the map contains the following information about each of the trains that were present at the time the snapshot was taken (Table <ref type="table" target="#tab_0">1</ref>).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.2">Weather</head><p>In addition to the traffic data we also collected the corresponding weather data for every train, because we suspect that weather has an influence on the delays as well. It was not easy to find a free provider which is capable of handling the necessary amount of requests, but after many trials we decided to use OpenWeatherMap <ref type="bibr" target="#b2">[3]</ref>. Its free tier gives access to 60 location-based weather requests per minute, which is still not enough for every individual train, but can be sufficient to place virtual weather stations all over Hungary with a resolution of approximately 35.5 km. Definition 1. Virtual weather station. A virtual weather station is a GPS position which can be queried for up-todate local weather information.</p><p>Calculating the coordinates of the virtual weather stations The first task is to distribute the available 60 slots uniformly such that every train can be assigned to the closest virtual weather station. Finding an exact solution to the problem would have been infeasible, therefore we decided to develop an approximation algorithm for which we used the GeoNames geographical database <ref type="bibr" target="#b3">[4]</ref> which contains POIs in Hungary and is available for download free of charge under the Creative Commons Attribution 4.0 license.</p><p>The algorithm (Algorithm 1) uses a k-d tree which is a space-partitioning data structure that allows fast nearest neighbor searches. <ref type="bibr" target="#b4">[5]</ref> The k-d tree is used to place 60 virtual weather stations on the map as follows: in each step the most populated POI is selected and then its neighboring POIs are eliminated in the given radius. It results in an approximately uniform placement of virtual weather stations and they are located at densely populated areas where accurate weather information benefits more people.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Algorithm 1 Approximation algorithm for virtual weather station placement</head><p>Funct getVirtualWeatherStationPositions(pois, radius)</p><p>1: pois ← pois.sort("population", "desc") 2: kdt ← kdTree &lt; POI &gt; ("haversine") 3: for poi ∈ pois do kdt.add(poi)</p><formula xml:id="formula_0">7:</formula><p>end if 8: end for 9: return kdt 2 Analysis</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Reconstruction of the railway network</head><p>In the traffic dataset there are millions of recorded GPS coordinates and the majority of them can be safely discarded after the necessary information have been extracted. For this task we used the Representative point extraction and updating algorithm by Zhongyi Ni et al. <ref type="bibr" target="#b5">[6]</ref> which is able to calculate the most significant points along a route and is also capable of refining these points as new data becomes available due to its online nature. The task is to determine the least amount of points (called the representative points) that can accurately represent such a route.</p><p>The above-mentioned algorithm can determine the points describing a route (Figure <ref type="figure" target="#fig_1">1</ref>) with an arbitrary resolution. However, the recorded GPS trajectories are noisy and may contain significantly misplaced outliers. The representative point extraction algorithm is able to properly handle noise, but it also creates new representative points in case of outliers, therefore a support-based postprocessing step is needed, which removes representative points that are encountered rarely.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">Conflicting trains</head><p>As a dimensionality reduction method it is beneficial to obtain the set of trains that might affect the delay of another train. It can be also used to model delay-chain propagation. The algorithm (Algorithm 2) determines the set of representative points which are within a given distance radius to a specific representative point rp and returns the set of trains that travel through those points without taking the temporal dimension into consideration, because we only use the intersection of conflicting trains with the currently traveling trains.</p><p>Algorithm 2 Algorithm for determining conflicting trains Funct getConflictingTrains(allRps, rp, radius) 1: kdt ← kdTree &lt; RP &gt; ("haversine", allRps) 2: nn ← kdt.searchRadius(rp, radius) 3: return n∈nn {n.trainId}</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.3">Association rules</head><p>We realized that the grouping of trains can be considered as a frequent itemset mining problem, therefore we used the Apriori algorithm <ref type="bibr" target="#b6">[7]</ref> for itemset mining and association rule learning. Definition 3. Delayed train. A train is officially considered to be delayed when its delay is greater than or equal to 5 minutes.</p><p>The algorithm requires transactions, which can be constructed based on the snapshots of the map. For each snapshot a transaction is made based on the set of conflicting delayed trains (Definition 2) in the given snapshot.</p><p>Association rules were generated for departure delays (Table <ref type="table" target="#tab_1">2</ref>), for which the snapshots taken upon the scheduled departure are used. The meaning of a rule is that if the set of antecedent trains are delayed then the consequent train is likely to depart late with the given metrics.</p><p>Low support values are due to the fact that train 2749 is only included in a transaction when it is delayed. The </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.4">Sequential rules</head><p>Besides the traditional association rule mining we can also consider consecutive snapshots of a specific train on a given day, which takes the temporal information into consideration as well (Table <ref type="table" target="#tab_2">3</ref>). Sequential pattern mining is almost the same as association rule mining, but instead of working directly with a transaction we consider consecutive transactions recorded in time. Sequential rules can be also mined for the departure delay, but they are more meaningful if we mine them along the entire route of the train. The rule A =⇒ B means that when the trains in A are delayed then train B will also become delayed in the future. In case of association rules we talked about trains that are usually delayed together, but now we have an additional temporal dimension.</p><p>In order to test this method we used the SPMF opensource data mining library <ref type="bibr" target="#b7">[8]</ref> with the RuleGrowth algorithm <ref type="bibr" target="#b8">[9]</ref>.</p><p>The support values are much higher in this case, because rules are mined along the entire route of the train. The support value of the frequent itemset containing train 2749 is 0.71 which means even though the train departed late only 36% of the time it got delayed 71% of the time during its trip.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.5">Other factors</head><p>In addition to the delay propagation there might be other factors that contribute to the delay of trains, like weather and temporality. In this section some of these factors will be analyzed with possible explanations and conclusions. The average of the trains' average delays along their route on a given day.</p><p>Definition 5. Average minimum (maximum) delay. The average of the trains' minimum (maximum) delays along their route on a given day.</p><p>Month It turned out that summer is the only specific season which has a peak in the average delays followed by autumn (Figure <ref type="figure" target="#fig_2">2</ref>). This effect might be caused by maintenance works, but there is no available historical maintenance data to confirm this theory. It's likely not caused by the number of passengers since there is no school in Hungary during the summer, which significantly reduces the number of passengers in the rush hours. Higher temperatures also seem to have an effect on the delays. Day of the week By looking at the average of all trains we can claim that Monday and Friday have the largest delays on average, while weekends have somewhat lower average delays (Figure <ref type="figure" target="#fig_7">3</ref>). It would be nice to have a dataset related to the number of passengers because the larger amount of passengers may cause delay peaks at the beginning and at the end of the workweek. The number of passengers may also have a correlation with the lower delays during the weekend, but we suspect that it is likely caused by the sparser schedule, which effectively reduces delay propagation.</p><p>Figure <ref type="figure" target="#fig_7">3</ref>: Average delays grouped by day of the week Holidays Holidays do not seem to have a significant effect on the average delays (Figure <ref type="figure" target="#fig_0">4</ref>). The peaks were mostly predictable according to the previous researches -Pentecost Monday and Saint Stephen's Day have slightly higher average delays but they are both in the Summer, which has the highest average delay among the seasons and Good Friday is a Friday, which has above average delay if we compare it to the other days of the week. As a conclusion, events do not seem to cause extraordinary delays, because they can be planned ahead. Time of the day By looking at the chart containing the delays grouped by hours, the rush hours can be clearly marked as delay peaks (Figure <ref type="figure" target="#fig_4">5</ref>). It can be concluded that as the number of passengers and the density of the schedule increase, the average delay increases as well. According to the research, most relations have this pattern. Two other peaks can be observed between 23:00 and 01:00. In order to understand them domain knowledge is needed. The reason behind the existence of the peaks is that only a very small number of train travels by that time in the country (sometimes even less than 10), and when some of them are delayed, it causes a huge impact on the average. Temperature The chart shows that the average delays increase as temperature tends to either -10 or +30 Celsius degrees (Figure <ref type="figure">6</ref>). Due to the distribution of trains, the ends of the chart are noisy, but the trendline can be easily seen.</p><p>Figure <ref type="figure">6</ref>: Average delays grouped by temperature Weather type As far as the type of weather is concerned, precipitation usually increases the delays (Figure <ref type="figure" target="#fig_5">7</ref>). The most troublesome types are related to snow in the winter and unexpected thunderstorms in the summer. Nearly all rain types have higher average delays than clear sky. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.6">Delay heatmap</head><p>An interesting visualization method is to generate a heatmap of delay changes (Figure <ref type="figure" target="#fig_6">8</ref>). It allows us to see where the delay accumulates during the trip and these peaks might suggest track problems, busy stations, or any other hidden issues that we are not aware of. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Departure delay prediction</head><p>Traveling in an unreliable environment on a daily basis can be nerve-wracking. The official mobile application of Hungarian State Railways has a delay forecasting mechanism, but it is quite limited in its current form. When a train is already moving then the schedule is automatically adjusted by its current delay. This estimation is not so reliable on the long term, but it can give you an idea about the scale of the expected delay under the current circumstances.</p><p>Another problem is that the forecast lacks a very important indicator, as it cannot tell whether the train is going to depart late or on-time. The forecast is only available after the train has already departed. The two main goals are to find a method to predict the departure delay and to improve the long term reliability of the delay forecast mechanism already present in the application.</p><p>Departure delay prediction is a special problem, because we do not have any information yet about the train we are interested in. Whether the train is going to depart late or on-time can only be predicted based on its observable environment. The input for the departure delay prediction problem is a set of snapshots taken at the scheduled departure time for which the target value is the delay of the train on its first appearance on the day.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.1">Association rules</head><p>The first idea is that the previously mined association rules (Table <ref type="table" target="#tab_1">2</ref>) should be applied and see if we can predict whether a train is going to be delayed or not upon departure.</p><p>The algorithm (Algorithm 3) of the model is very simple, it only requires a set of association rules extracted based on the input for departure delays. A train is considered to be delayed if it is a consequent in a rule for which all the antecedent trains are delayed in a given snapshot of the map. The hyper-parameters of the model are the minimum support and minimum confidence of the rules. The results (Table <ref type="table" target="#tab_3">4</ref>) are impressive, but according to the research it turned out there are simply not enough information for the association rule mining algorithm in its current form which causes underfitting. Trains are categorized as either delayed or on-time, which cannot properly handle the following situation: when an antecedent train is delayed more than a given threshold (for example 10 minutes) then the consequent train can depart on-time as they are far away from each other and a slot becomes available for the consequent train. Otherwise, the delay of the antecedent train propagates to the consequent train. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">Train embedding</head><p>In order to solve the underfitting problem that affects the association and sequential rules, a different approach is necessary. It is not enough to have an indicator whether a train is delayed or not, the exact numeric values are needed instead. It is also important to have an input with fixed length for the algorithms.</p><p>The solution (Algorithm 4, Table <ref type="table" target="#tab_5">5</ref>) is that each conflicting train that travels when a specific train departs is considered as a unique feature with its current delay. If a previously encountered conflicting train is not present at the time, its delay becomes 0 as it likely won't affect the delay-chain. First, the algorithm is called with an empty state vector and a subset of trains from a snapshot. If the identifier of a train is not contained in the state vector then it is appended to it. For each train identifier in the state we determine whether it is present in the current input or not and we append its current delay to the embedding. If a train is not found in the input, its current delay is considered to be 0. The returned state can be then re-used to embed another set of trains. Before training, the embeddings can be safely padded with zeros to have a common length.</p><p>Algorithm 4 Algorithm for creating train embeddings Funct embed(state,trains) end if 13: end for 14: return state, embedding They usually have high dimensions but they can be visualized using dimensionality reduction methods (Figure <ref type="figure">9</ref>). In the following picture trains that depart on-time are Figure <ref type="figure">9</ref>: Embeddings for train 2749 visualized using 3dimensional PCA</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3">Support-vector machine</head><p>A support-vector machine <ref type="bibr" target="#b9">[10]</ref> tries to find a hyperplane in an n-dimensional space which separates, and therefore classifies the data points. This hyperplane should have maximum margin, which means it should have maximal distance between the two classes, so future data points can be classified more reliably.</p><p>For each train, a unique model is trained. In our example, the space is 45-dimensional and the hyperplane separates the trains that depart on-time and the trains that depart late. For the SVM experiment we've implemented a grid-search (Table <ref type="table" target="#tab_6">6</ref>) and executed it on the training set with 5-fold cross-validation with the following parameters: </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.4">Random Forest Classifier</head><p>A random forest <ref type="bibr" target="#b10">[11]</ref> is an ensemble model which fits multiple decision trees and outputs their mode. Each decision tree splits the dataset a variable number of times based on the delays of the conflicting trains and outputs whether the train is going to depart late or not.</p><p>The training methodology was similar to SVM's, we ran a grid-search (Table <ref type="table" target="#tab_8">8</ref>) with 5-fold cross-validation on the training set with the following parameters: The results (Table <ref type="table" target="#tab_9">9</ref>) are slightly better than the SVM's, and the trained model also helps with the explainability of the delay-chains, which is useful to prevent them from occurring in the future. The best parameters were bootstrap=true, max_depth=10, min_samples_leaf=2, min_samples_split=10 and n_estimators=200. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Generic delay prediction</head><p>Based on the research experiences with departure delays it is time to solve the prediction problem in general with deep neural networks. As it was mentioned before, the delay estimation in the official mobile application is not so reliable on the long term, therefore it would be beneficial to find a method for predicting the real schedule. The reason behind choosing deep neural networks is that state-ofthe-art multivariate time series forecasting methods tend to use these technologies. <ref type="bibr" target="#b11">[12]</ref> The general delay prediction task will be formulated as a regression problem instead of classification, because it is more informative for the end-user and there are significantly more data available when we consider snapshots after departure as well.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.1">Input</head><p>For each day the snapshots containing a given train t are collected in ascending order by their timestamp (Table <ref type="table" target="#tab_10">10</ref>). It must be noted that there can be a different amount of snapshots for each day, because a delayed train obviously travels for a longer period of time. In this section a daily collection of ordered snapshots for a given train t will be referred as the input. Based on the data, there are two kinds of preprocessed inputs for each day, a vector of auxiliary features and a matrix of time-series features (Table <ref type="table" target="#tab_11">11</ref>).</p><p>The auxiliary features include an indicator whether the given day is a weekday, an indicator whether the given train departs during the rush hours and the one-hot encoded representation of the month upon departure.</p><p>For the time-series features a similar train embedding is used as before, the only difference is that this time the train we are interested in is also included in the embedding. The embedding has a much higher dimensionality, because conflicting trains are embedded over the entire route of the train. In order to keep the input dimension manageable, only the characteristics of the train embeddings are used.</p><p>An entry in the time-series input contains the current delay of the train, the classified weather and the mean, standard deviation, minimum and maximum values of the delays of the conflicting trains.</p><p>Let's suppose that train t traveled during k days over the interval covered by the dataset and the number of timeseries features for all of its snapshots are m. Thus the 3D input of the network has dimensions (k, l i , m) where l i is the number of snapshots on the i th day.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Output</head><p>For each entry in the time-series input the corresponding output becomes the vector of true delays in the future after n minutes where n ∈ {5, 10, 20, 30}. Let's assume that the train we are interested in is t and its current delay is determined by d t (X i ). For each snapshot X i let the output y i j equal to the delay of train t at snapshots X i+n j ( j = 1..4).</p><p>In case of out of bounds indices the delay of t at the last snapshot of the day is used instead.</p><formula xml:id="formula_1">y true i = [d t (X i+5 ), d t (X i+10 ), d t (X i+20 ), d t (X i+30 )]</formula><p>Official model The main goal of the generic delay prediction task is to obtain a more accurate forecast than it is currently available in the official mobile application. In order to have a meaningful comparison, we have to recreate the model of the official forecast method and calculate its loss and other metrics alongside our model. Fortunately, the official model is not too complicated, it simply substitutes the current delay for all future occurrences.</p><formula xml:id="formula_2">y o f f icial i = [d t (X i ), d t (X i ), d t (X i ), d t (X i )]</formula><p>LSTM model Our model has to support both the auxiliary and time-series features, therefore a multi-input network is necessary. This problem is similar to the image captioning task, where an image is chosen as an auxiliary feature and the words of the generated caption are sequence-like. <ref type="bibr" target="#b12">[13,</ref><ref type="bibr" target="#b13">14]</ref> Due to the fact that there can be a varying number of snapshots per day some sort of recurrent neural network (RNN) is needed, which can handle the temporal nature of the data as well. The output of an RNN depends not only on the current input but on the previous outputs as well. Its memory is very useful for the prediction of the delays, because it can learn complicated delay patterns.</p><p>The RNN can also have a preset initial state, where we can store the representation of the auxiliary features and the resulting network models P(X i+1 |X 0:i , auxiliary). <ref type="bibr" target="#b14">[15]</ref> This auxiliary condition allows us to have a single network for all trains if we include a train identifier, but due to resource constraints this was not used during the research.  </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3">Evaluation</head><p>The first evaluation was performed on train 2749. Out of the 236 available occurrences only 231 were used, where the maximum delay along the route was less than 30 minutes. There is simply not enough data for the outliers where delay may occasionally exceed 250 minutes.</p><p>The following metrics (Figure <ref type="figure" target="#fig_8">10</ref>, Table <ref type="table" target="#tab_12">12</ref>) were calculated using 3-fold cross-validation.</p><p>For this train the LSTM model gives better and better results as n increases compared to the official model.</p><p>On average, the proposed LSTM model outperforms the official model, but only when significant outliers are omitted from the dataset. The proposed model is not able to learn extreme delays yet reliably due to their rare nature, but the official model is able to forecast them easily by simply substituting the current delay in a linear manner. This is not a huge issue, because if a train is delayed that much it usually skips its trip on that day entirely and passengers are informed on multiple platforms.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.4">Conclusion</head><p>The analysis and the machine learning models presented in this paper could be useful for the betterment of railway services in Hungary and they may also increase the satisfaction of the passengers. Hungarian State Railways also expressed their interest in the continuation of the research project in cooperation with our university.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>4 :</head><label>4</label><figDesc>nn ← kdt.searchRadius(poi, radius)5:if nn = / 0 then 6:</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Figure 1 :</head><label>1</label><figDesc>Figure 1: Reconstructed railway network of Hungary</figDesc><graphic coords="2,314.65,110.34,216.84,131.51" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Figure 2 :</head><label>2</label><figDesc>Figure 2: Average delays grouped by month</figDesc><graphic coords="3,314.65,502.12,216.85,162.64" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_3"><head>Figure 4 :</head><label>4</label><figDesc>Figure 4: Average delays grouped by holidays in 2019</figDesc><graphic coords="4,63.78,552.48,216.85,150.05" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_4"><head>Figure 5 :</head><label>5</label><figDesc>Figure 5: Average delays grouped by hour</figDesc><graphic coords="4,314.65,258.46,216.85,162.64" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_5"><head>Figure 7 :</head><label>7</label><figDesc>Figure 7: Average delays grouped by weather type</figDesc><graphic coords="5,63.78,181.93,216.85,141.14" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_6"><head>Figure 8 :</head><label>8</label><figDesc>Figure 8: Delay heatmap of train 2749 between Monor and Budapest-Nyugati</figDesc><graphic coords="5,75.83,492.51,192.75,96.56" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_7"><head>Algorithm 3</head><label>3</label><figDesc>Algorithm for predicting the departure delay (association rules) Funct predictDepartureDelayAr(snapshot, rules) 1: delayedTrains ← getDelayedTrains(snapshot) 2: for rule ∈ rules do 3: if rule.getAntecedents() ⊆ delayedTrains then</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_8"><head>Figure 10 :</head><label>10</label><figDesc>Figure 10: Comparison of different 10-minute prediction models for train 2749 on a given day</figDesc><graphic coords="8,314.65,122.29,216.85,135.11" type="bitmap" /></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_0"><head>Table 1 :</head><label>1</label><figDesc>Details of a train entry in a snapshot</figDesc><table><row><cell>Field name</cell><cell>Example</cell></row><row><cell>Date</cell><cell>"2019.10.29 20:09:38"</cell></row><row><cell>Elvira ID</cell><cell>"5614115_191029"</cell></row><row><cell>Operator</cell><cell>"MAV"</cell></row><row><cell>Line</cell><cell>"40"</cell></row><row><cell cols="2">Train number "55808"</cell></row><row><cell>Relation</cell><cell>"Budapest-Keleti -Pécs"</cell></row><row><cell>Latitude</cell><cell>46.26418</cell></row><row><cell>Longitude</cell><cell>18.10566</cell></row><row><cell>Delay</cell><cell>5</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_1"><head>Table 2 :</head><label>2</label><figDesc>A subset of association rules generated for train 2749</figDesc><table><row><cell>Antecedents</cell><cell cols="3">Consequent Supp. Conf.</cell></row><row><cell>2879,2739</cell><cell>2749</cell><cell>0.21</cell><cell>0.81</cell></row><row><cell>2879,7039,2739</cell><cell>2749</cell><cell>0.19</cell><cell>0.84</cell></row><row><cell>2879,2859,2739</cell><cell>2749</cell><cell>0.17</cell><cell>0.82</cell></row><row><cell cols="2">2879,7039,2859,2739 2749</cell><cell>0.16</cell><cell>0.84</cell></row><row><cell>2879,700,7039</cell><cell>2749</cell><cell>0.15</cell><cell>0.80</cell></row><row><cell>2879,700,2859</cell><cell>2749</cell><cell>0.15</cell><cell>0.83</cell></row><row><cell>2879,6299,2739</cell><cell>2749</cell><cell>0.14</cell><cell>0.87</cell></row><row><cell cols="2">2879,7039,6299,2739 2749</cell><cell>0.14</cell><cell>0.89</cell></row><row><cell>2879,700,2739</cell><cell>2749</cell><cell>0.14</cell><cell>0.83</cell></row><row><cell cols="2">700,7039,2859,2879 2749</cell><cell>0.13</cell><cell>0.85</cell></row><row><cell>2879,2740,2739</cell><cell>2749</cell><cell>0.12</cell><cell>0.93</cell></row><row><cell>2879,2740,2859</cell><cell>2749</cell><cell>0.12</cell><cell>0.84</cell></row><row><cell cols="4">frequent itemset containing train 2749 has a support value</cell></row><row><cell cols="4">of 0.36 which means the train departs late roughly 36% of</cell></row><row><cell>the time.</cell><cell></cell><cell></cell><cell></cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_2"><head>Table 3 :</head><label>3</label><figDesc>A subset of sequential rules generated for train 2749 Antecedents Consequent Supp. Conf.</figDesc><table><row><cell>2879</cell><cell>2749</cell><cell>0.63</cell><cell>0.97</cell></row><row><cell>7049</cell><cell>2749</cell><cell>0.61</cell><cell>0.97</cell></row><row><cell>2669,2879</cell><cell>2749</cell><cell>0.60</cell><cell>0.97</cell></row><row><cell>2669,6099</cell><cell>2749</cell><cell>0.61</cell><cell>0.90</cell></row><row><cell>2669</cell><cell>2749</cell><cell>0.67</cell><cell>0.90</cell></row><row><cell>6099</cell><cell>2749</cell><cell>0.63</cell><cell>0.87</cell></row><row><cell>2649</cell><cell>2749</cell><cell>0.61</cell><cell>0.86</cell></row><row><cell>7009</cell><cell>2749</cell><cell>0.61</cell><cell>0.84</cell></row><row><cell cols="2">Definition 4. Average delay.</cell><cell></cell><cell></cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_3"><head>Table 4 :</head><label>4</label><figDesc>Departure delay prediction metrics for train 2749 using the association rules on the test set</figDesc><table><row><cell></cell><cell cols="4">Precision Recall F1-score Support</cell></row><row><cell>On time</cell><cell>0.85</cell><cell>0.85</cell><cell>0.85</cell><cell>194</cell></row><row><cell>Late</cell><cell>0.72</cell><cell>0.71</cell><cell>0.72</cell><cell>105</cell></row><row><cell>Accuracy</cell><cell></cell><cell></cell><cell>0.80</cell><cell>299</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_5"><head>Table 5 :</head><label>5</label><figDesc>An example train embedding 406 472 580 609 619 709 2617 ...</figDesc><table><row><cell>3</cell><cell>18 1</cell><cell>3</cell><cell>3</cell><cell>0</cell><cell>2</cell><cell>...</cell></row><row><cell>3</cell><cell>20 2</cell><cell>3</cell><cell>4</cell><cell>0</cell><cell>1</cell><cell>...</cell></row></table><note>denoted by green squares and trains that depart late are marked as red squares.</note></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_6"><head>Table 6 :</head><label>6</label><figDesc>Parameter grid for the SVM experiment</figDesc><table><row><cell>Parameter name</cell><cell>Possible values</cell></row><row><cell>Regul. parameter (C)</cell><cell>0.001, 0.01, 0.1, 1, 10</cell></row><row><cell>Kernel</cell><cell>linear, poly, rbf, sigmoid</cell></row><row><cell cols="2">Kernel coeff. (gamma) 0.001, 0.01, 0.1, 1</cell></row><row><cell>Indep. term (coef0)</cell><cell>0.0, 0.001, 0.01, 0.1, 1, 10</cell></row><row><cell cols="2">The grid-search optimizes the hyper-parameters of the</cell></row><row><cell cols="2">SVM model on the training dataset which results in better</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_7"><head>Table 7 :</head><label>7</label><figDesc>SVM prediction metrics for train 2749</figDesc><table><row><cell></cell><cell cols="4">Precision Recall F1-score Support</cell></row><row><cell>On time</cell><cell>0.92</cell><cell>0.97</cell><cell>0.94</cell><cell>194</cell></row><row><cell>Late</cell><cell>0.94</cell><cell>0.84</cell><cell>0.88</cell><cell>105</cell></row><row><cell>Accuracy</cell><cell></cell><cell></cell><cell>0.92</cell><cell>299</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_8"><head>Table 8 :</head><label>8</label><figDesc>Parameter grid for the Random Forest Classifier</figDesc><table><row><cell>Parameter name</cell><cell>Possible values</cell></row><row><cell>n_estimators</cell><cell>200, 600, 1200, 1800</cell></row><row><cell>max_depth</cell><cell>10, 50, 100, unlimited</cell></row><row><cell cols="2">min_samples_split 2, 5, 10</cell></row><row><cell cols="2">min_samples_leaf 1, 2, 4</cell></row><row><cell>bootstrap</cell><cell>True, False</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_9"><head>Table 9 :</head><label>9</label><figDesc>Random Forest Classifier prediction metrics for train 2749</figDesc><table><row><cell></cell><cell cols="4">Precision Recall F1-score Support</cell></row><row><cell>On time</cell><cell>0.97</cell><cell>1.00</cell><cell>0.98</cell><cell>194</cell></row><row><cell>Late</cell><cell>1.00</cell><cell>0.90</cell><cell>0.95</cell><cell>105</cell></row><row><cell>Accuracy</cell><cell></cell><cell></cell><cell>0.97</cell><cell>299</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_10"><head>Table 10 :</head><label>10</label><figDesc>A subset of the input for train 2749 on a given day</figDesc><table><row><cell>Date</cell><cell cols="2">Train Delay Lat</cell><cell>Lon</cell><cell>...</cell></row><row><cell cols="2">19-06-16 06:39 2749 0</cell><cell cols="3">47.35 19.43 ...</cell></row><row><cell cols="2">19-06-16 06:40 2749 0</cell><cell cols="3">47.35 19.43 ...</cell></row><row><cell cols="2">19-06-16 06:40 2749 0</cell><cell cols="3">47.35 19.42 ...</cell></row><row><cell cols="2">19-06-16 06:41 2749 1</cell><cell cols="3">47.36 19.42 ...</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_11"><head>Table 11 :</head><label>11</label><figDesc>Preprocessed time-series input on a given day</figDesc><table><row><cell cols="5">Delay Weather Mean STD Min Max</cell></row><row><cell>0</cell><cell>3</cell><cell>1.20</cell><cell>2.69 0</cell><cell>13</cell></row><row><cell>0</cell><cell>3</cell><cell>1.25</cell><cell>2.65 0</cell><cell>13</cell></row><row><cell>0</cell><cell>3</cell><cell>1.32</cell><cell>2.62 0</cell><cell>13</cell></row><row><cell>1</cell><cell>3</cell><cell>1.35</cell><cell>2.60 0</cell><cell>13</cell></row></table></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_12"><head>Table 12 :</head><label>12</label><figDesc>Evaluation of the generic prediction model on train 2749 n = 5 n = 10 n = 20 n = 30</figDesc><table><row><cell>LSTM MSE</cell><cell>1.03</cell><cell>2.01</cell><cell>4.23</cell><cell>7.07</cell></row><row><cell>LSTM R 2</cell><cell>0.97</cell><cell>0.95</cell><cell>0.91</cell><cell>0.84</cell></row><row><cell cols="2">Official MSE 1.28</cell><cell>3.03</cell><cell>7.63</cell><cell>12.92</cell></row><row><cell>Official R 2</cell><cell>0.97</cell><cell>0.93</cell><cell>0.83</cell><cell>0.72</cell></row></table></figure>
		</body>
		<back>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<monogr>
		<title level="m" type="main">Smart alarm clock based on traffic and weather information</title>
		<author>
			<persName><forename type="first">Roland</forename><surname>Krisztián</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Szabó</forename></persName>
		</author>
		<imprint>
			<date type="published" when="2018">2018</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<monogr>
		<title level="m" type="main">MÁV-START térkép</title>
		<author>
			<persName><forename type="first">Központ</forename><surname>Máv Szolgáltató</surname></persName>
		</author>
		<author>
			<persName><surname>Zrt</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2020-01-16">2020. 16-January-2020</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<monogr>
		<title/>
		<author>
			<persName><surname>Openweathermap</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2020-01">2020. January-2020</date>
			<publisher>Openweather Ltd</publisher>
		</imprint>
	</monogr>
	<note>Online; accessed 16</note>
</biblStruct>

<biblStruct xml:id="b3">
	<monogr>
		<title level="m">GeoNames dump</title>
				<meeting><address><addrLine>Hungary</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2020-01">2020. January-2020</date>
		</imprint>
		<respStmt>
			<orgName>GeoNames Team</orgName>
		</respStmt>
	</monogr>
	<note>Online; accessed 16</note>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Multidimensional binary search trees used for associative searching</title>
		<author>
			<persName><forename type="first">Jon</forename><surname>Louis</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Bentley</forename></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Commun. ACM</title>
		<imprint>
			<biblScope unit="volume">18</biblScope>
			<biblScope unit="issue">9</biblScope>
			<biblScope unit="page" from="509" to="517" />
			<date type="published" when="1975-09">September 1975</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Incremental road network generation based on vehicle trajectories</title>
		<author>
			<persName><forename type="first">Zhongyi</forename><surname>Ni</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Lijun</forename><surname>Xie</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Tian</forename><surname>Xie</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Binhua</forename><surname>Shi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Yao</forename><surname>Zheng</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">ISPRS International Journal of Geo-Information</title>
		<imprint>
			<biblScope unit="volume">7</biblScope>
			<biblScope unit="issue">10</biblScope>
			<date type="published" when="2018">2018</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<analytic>
		<title level="a" type="main">Fast algorithms for mining association rules in large databases</title>
		<author>
			<persName><forename type="first">Rakesh</forename><surname>Agrawal</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Ramakrishnan</forename><surname>Srikant</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 20th International Conference on Very Large Data Bases, VLDB &apos;94</title>
				<meeting>the 20th International Conference on Very Large Data Bases, VLDB &apos;94<address><addrLine>San Francisco, CA, USA</addrLine></address></meeting>
		<imprint>
			<publisher>Morgan Kaufmann Publishers Inc</publisher>
			<date type="published" when="1994">1994</date>
			<biblScope unit="page" from="487" to="499" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<monogr>
		<title level="m" type="main">SPMF open-source data mining library</title>
		<author>
			<persName><forename type="first">Philippe</forename><surname>Fournier</surname></persName>
		</author>
		<author>
			<persName><forename type="first">-</forename><surname>Viger</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2020-03-17">2020. 17-March-2020</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">Rulegrowth: Mining sequential rules common to several sequences by pattern-growth</title>
		<author>
			<persName><forename type="first">Philippe</forename><surname>Fournier-Viger</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Roger</forename><surname>Nkambou</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Vincent</forename><surname>Shin</surname></persName>
		</author>
		<author>
			<persName><forename type="first">-Mu</forename><surname>Tseng</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 2011 ACM Symposium on Applied Computing, SAC &apos;11</title>
				<meeting>the 2011 ACM Symposium on Applied Computing, SAC &apos;11<address><addrLine>New York, NY, USA</addrLine></address></meeting>
		<imprint>
			<publisher>Association for Computing Machinery</publisher>
			<date type="published" when="2011">2011</date>
			<biblScope unit="page" from="956" to="961" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">Support-vector networks</title>
		<author>
			<persName><forename type="first">Corinna</forename><surname>Cortes</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Vladimir</forename><surname>Vapnik</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Mach. Learn</title>
		<imprint>
			<biblScope unit="volume">20</biblScope>
			<biblScope unit="issue">3</biblScope>
			<biblScope unit="page" from="273" to="297" />
			<date type="published" when="1995-09">September 1995</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b10">
	<analytic>
		<title level="a" type="main">Random decision forests</title>
		<author>
			<persName><forename type="first">Kam</forename><surname>Tin</surname></persName>
		</author>
		<author>
			<persName><surname>Ho</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the Third International Conference on Document Analysis and Recognition</title>
				<meeting>the Third International Conference on Document Analysis and Recognition<address><addrLine>USA</addrLine></address></meeting>
		<imprint>
			<publisher>IEEE Computer Society</publisher>
			<date type="published" when="1995">1995</date>
			<biblScope unit="volume">1</biblScope>
			<biblScope unit="page">278</biblScope>
		</imprint>
	</monogr>
	<note>ICDAR &apos;95</note>
</biblStruct>

<biblStruct xml:id="b11">
	<monogr>
		<title level="m" type="main">Papers with Code. Multivariate Time Series Forecasting</title>
		<imprint>
			<date type="published" when="2020-05">2020. 08-May-2020</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b12">
	<monogr>
		<title level="m" type="main">Deep visual-semantic alignments for generating image descriptions</title>
		<author>
			<persName><forename type="first">Andrej</forename><surname>Karpathy</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Fei-Fei</forename><surname>Li</surname></persName>
		</author>
		<idno>CoRR, abs/1412.2306</idno>
		<imprint>
			<date type="published" when="2014">2014</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b13">
	<monogr>
		<title level="m" type="main">Show and tell: A neural image caption generator</title>
		<author>
			<persName><forename type="first">Oriol</forename><surname>Vinyals</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Alexander</forename><surname>Toshev</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Samy</forename><surname>Bengio</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Dumitru</forename><surname>Erhan</surname></persName>
		</author>
		<idno>CoRR, abs/1411.4555</idno>
		<imprint>
			<date type="published" when="2014">2014</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b14">
	<monogr>
		<title level="m" type="main">Conditional RNN</title>
		<author>
			<persName><forename type="first">Philippe</forename><surname>Rémy</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2019-03-17">2019. 17-March-2020</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b15">
	<monogr>
		<idno>EFOP-3.6.3-VEKOP-16-2017-00001</idno>
		<title level="m">Talent Management in Autonomous Vehicle Control Technologies -The Project is supported by the Hungarian Government and cofinanced by the European Social Fund</title>
				<imprint/>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
