14

Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

Scientia Iranica A (2019) 26(5), 2689{2702

Sharif University of TechnologyScientia Iranica

Transactions A: Civil Engineeringhttp://scientiairanica.sharif.edu

Airline delay prediction by machine learning algorithms

H. Khaksar and A. Sheikholeslami�

Department of Transportation Engineering and Planning, School of Civil Engineering, Iran University of Science & Technology,Tehran, Iran.

Received 24 May 2017; received in revised form 15 October 2017; accepted 23 December 2017

KEYWORDSFlight delay predictor;Airline delay;Data mining;Machine learningalgorithms;Visibility distance.

Abstract. Flight planning, as one of the challenging issues in the industrial world, isfaced with many uncertain conditions. One such condition is delay occurrence, which stemsfrom various factors and imposes considerable costs on airlines, operators, and travelers.With these considerations in mind, we implemented ight delay prediction through theproposed approaches that were based on machine learning algorithms. The parametersthat enabled e�ective estimation of delay were identi�ed and then, Bayesian modeling,decision tree, cluster classi�cation, random forest, and hybrid method were applied toestimate the occurrences and magnitude of delay in a network. These methods were testedon a US ight dataset and then, re�ned for a large Iranian airline network. Results showedthat the parameters a�ecting delay in US networks were visibility, wind, and departuretime, whereas those a�ecting delay in the Iranian airline ights were eet age and aircrafttype. The proposed approaches exhibited an accuracy of more than 70% in calculatingdelay occurrence and magnitude for both the US and Iranian networks. It is hoped thatthe techniques put forward in this work will enable airline companies to accurately predictdelays, improve ight planning, and prevent delay propagation.© 2019 Sharif University of Technology. All rights reserved.

1. Introduction

Over the past century, airlines have grown from sim-ple contract mail carriers to intellectually appealingbusinesses. However, the airline industry is verycompetitive, dynamic, and random in nature, therebygiving rise to uncertainties. One such uncertainty is ight delay, which is attributed to various factors, suchas bad weather conditions, physical aws, delayed ightarrivals, and crew related issues [1]. It is obviousthat ight delays have a direct impact on passengersatisfaction and thus, on the economic performanceof airlines. As estimated by the Total Delay ImpactStudy, the total cost arising from all US air transporta-

*. Corresponding author. Fax: +98 21 88331528E-mail addresses: [email protected] (H. Khaksar);[email protected] (A. Sheikholeslami)

doi: 10.24200/sci.2017.20020

tion delays in 2007 was US.$32.9 billion [2]. Giventhis �gure, airline companies have been concernedprimarily with understanding and mitigating delays.Many researchers have also attempted to predict theseuncertainties and ensure more reliable and robust ights. Achieving these goals requires evolution inapproaches to airline planning, a development that ispossible through a consideration of operational issuesin the planning process.

Flight planning is a complicated process thatinvolves many variables. As one of the tasks in ightplanning, scheduling is performed using a step-by-step process that covers two separate phases, namely,the planning and operational phases. In each phase,certain sub-problems of low complexity occur and aresolved sequentially [3]. The planning phase entailsfour steps, namely, ight scheduling, eet assignment, eet routing, and crew assignment. Each of thesesteps is implemented separately and used as the inputto the next step. The operational phase involves

Page 2: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

2690 H. Khaksar and A. Sheikholeslami/Scientia Iranica, Transactions A: Civil Engineering 26 (2019) 2689{2702

revenue management, gate assignment, and irregularoperation steps. Revenue management is one of themost important components of the operational phaseand is used by airlines as the basis for controllingthe number of seats sold at di�erent fares. Gateassignment revolves around the allocation of gates toboarding and departure. When an airplane descendsto a height at which it is cleared for landing, thecontrol tower assigns gates to the airplane on the basisof the activities of other airplanes. The last step isirregular operation, which concerns the tendency of ight program implementation to deviate from plans.When a ight delay occurs, the airline operation controlcenter executes activities designed to prevent delaypropagation to other ights.

An e�ective ight planning process is ensuredthrough three approaches: the classic approach, therobust approach, and disruption management. In theclassic approach, the problems that occur in each stepof the planning phase are separately implemented orthe problems in a number of steps are integrated andsolved simultaneously. Details on this approach can befound in [4-6]. In the robust approach, the problemsoccurring in one or more steps of the planning phaseare solved in relation to the operational phase. Moreinformation on this method is provided in [7,8]. Dis-ruption management involves the consideration of theoperational problems that occur during ight planning.As indicated by the term, this approach is used whena disruption occurs [9,10].

The Bureau of Transportation Statistics of the USDepartment of Transportation releases national-levelinformation about the on-time arrival performance of ights. Such information on all US airlines for aperiod of 12 years is shown in Figure 1. As shownin this �gure, delays can be caused by seven factors:aircraft delay, weather condition, national aviationsystem delay, security problems, late ight arrival, ight cancellation, and ight diversion [11].

Delays are generally classi�ed into two types,namely, arrival and departure delays. A ight withless than 15 minutes delay with respect to arrival and

Figure 1. On-time arrival performance.

departure times printed on the ticket is considered ontime. The causes of airport delays include weather,airport congestion, luggage loading, and passengerconnection issues. Correspondingly, airline delay pre-diction is a very complex pragmatic and scienti�cchallenge. It becomes even more important whenthe robust approach and disruption management havealready been applied. Robust planning is intended todecrease delays and prevent delay propagation to other ights. Its �rst stage therefore involves determiningdelay. Disruption management should also be directedtoward delay prediction.

To accurately predict delays, improve ight plan-ning, and prevent delay propagation, we put forwardnew delay prediction approaches that are based ondata mining and machine learning. These methodsare Bayesian modeling, decision tree, cluster classi�-cation, random forest, and hybrid algorithms. Theapproaches are applied in experiments to the US andIranian ight networks. The rest of the paper isorganized as follows. Section 2 presents an overview ofthe literature and Section 3 describes well-establishedData Mining Techniques (DMTs) for airline delayprediction. Section 4 explains the proposed methodsand Section 5 discusses the experimental datasets andresults. Finally, Section 6 provides the conclusions andrecommendations.

2. Literature review

Airline operations are highly complex processes thatare intended to regulate many expensive, tightly con-strained, and interdependent resources, such as thecrew, aircraft, airports, and maintenance facilities.Many studies have been carried out on airline planningproblems, but only a few have been performed on thecharacteristics of airline delays and the prediction ofdelay statistics. Delays occur when an event takes placelater than the time at which it is planned, scheduled,or expected to happen [12]. Delays in departure canoccur due to bad weather conditions, seasonal andholiday demands, airline policies, technical issues suchas the problems in airport facilities, luggage handlingand mechanical apparatus, and accumulation of delaysfrom preceding ights (Figure 2). In a study conductedby Tu et al., distribution of departure delays at DenverInternational Airport was estimated with the help ofa probabilistic model, which relied on a combinationof genetic algorithms and expectation-maximizationalgorithm [13].

In a study carried out by Mueller and Chatterji,the probability density function of delays in majorairports of America was estimated by normal andPoisson distributions [14]. After using the densityfunctions to model the departure delay, enroute delay,and arrival delay, Poisson distribution was found to

Page 3: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

H. Khaksar and A. Sheikholeslami/Scientia Iranica, Transactions A: Civil Engineering 26 (2019) 2689{2702 2691

Figure 2. Factors in uencing departure delays.

be capable of predicting departure delays, but it wasoutperformed by normal distribution in the predictionof enroute and arrival delays. Avijit et al. proposedan aggregate and strategic model for average delaysand cancellation probabilities, and applied the modelto the context of LaGuardia Airport [15]. In a researchconducted by Sridhar et al., weather-related ightdelays and cancellations at the national, regional, andairport levels were predicted by regression models andneural networks [16]. Lu presented Bayesian networkand decision tree models to describe ight delays andstated that accurately predicting such delays was verydi�cult [17]. Lu et al. compared the performancesof Naive Bayes, decision tree, and neural networkalgorithms in predicting delays on the basis of largedatasets [18]. The authors observed that the decisiontree algorithm had the best performance presenting aprediction con�dence of 70% [18]. Bola~nos and Murphyinvestigated the e�ects of airports on ight delays [19].The researchers used a graph theory to analyze directedweighted graphs that represented the propagation ofdelays across the National Airspace System (NAS)of America. Their �ndings revealed that the NewYork area was responsible for 15% of injected delaysand 9% of propagated delays in the NAS. Rebolloand Balakrishnan used random forests and regressionmodels to predict air tra�c delays [20]. The authorsexamined their models using the 100 most frequentlydelayed links in the NAS. They found that the averagetest error over the 100 links was 19% and the averagemedian test error over the links was 21 minutes. Ozaet al. predicted ight delays on the basis of certaindata patterns observed from previously acquired ightinformation [21]. The researchers used classi�er modelsto predict airline delays and achieved an estimationaccuracy of 64.08% with the OneR algorithm.

Allan et al. probed into delays at New York cityairports for two years to determine the major causes ofdelays and discovered that delays were caused primarilyby the weather inside and outside the terminal areasand high winds [22]. In a study carried out by Wu,the e�ects of short bu�er times and random operationdisruptions on the consequent ight delays were inves-tigated [23]. This study demonstrated the necessity of

incorporating the stochasticity of daily operations intoairline schedules. The author asserted that schedulescould become robust and reliable only if bu�er timeswere appropriately embedded and designed duringscheduling. Wang et al. used queuing models toanalyze how the responses to propagated delays variedby airport [24]. The same method was also used byJanic for the quanti�cation of economic e�ects of ightdelays [25]. Hsiao and Hansen adopted a statisticalmodel to examine the e�ects of di�erent parameters,such as time of day, congestion, and weather conditionson ight delays [26]. In a research conducted by Rupp,the primary causes of delay were explored by studyingimportant factors such as weather condition, stationtype (hub versus spoke), and seasonality [27].

In an article by Boswell and Evans a probabilisticmass function was used to classify the delays and then,delay build-up for the subsequent ights was analyzedwith the help of a transition matrix [28]. After theanalysis of cancellations, the conditional probabilityof ight cancellation in the presence of delay build-up from preceding ights was determined. In a studycarried out by Chen et al., departure and arrival delayswere successfully predicted with the assistance of amodel developed based on a fuzzy Support VectorMachine (SVM) with a weighted margin [29]. Theevaluations carried out based on the de�nition of �vegrades of delays demonstrated the high predictionaccuracy of the ensemble fuzzy support vector machinewith a weighted margin as compared to standaloneSVM.

The studies reviewed are summarized in Table 1.As can be seen, although several studies have beendevoted to predicting airline delays, such predictionremains a challenge to ight planners. Many param-eters are involved in the occurrence of delays; thus,delay forecasting necessitates the assessment of largedatabases.

3. Data mining for airline delay prediction

The analysis and design of complicated and large-scale systems with many variables require new methodsthat can identify, classify, and analyze voluminousdata. Accordingly, researchers put forward data miningapproaches to identifying, collecting, classifying, andranking or generating and storing valuable informa-tion from such databases. These approaches learnknowledge from an available databank with the helpof machine learning algorithms. Data mining can alsobe used to predict future events.

DMTs are a branch of arti�cial intelligence thathave been used since 1960 [30]. In such techniques,prediction is a decision problem with the followingcomponents [31]:

Page 4: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

2692 H. Khaksar and A. Sheikholeslami/Scientia Iranica, Transactions A: Civil Engineering 26 (2019) 2689{2702

Table 1. Summary of literature review.

Author Methodology Results

Tu et al. [13] Probabilistic models The probability of delay can be predicted whendelays are less than 2 hours.

Mueller et al. [14] Normal and Poisson distributionsPoisson distribution is better for departuredelays and arrival delays can �t the normaldistribution.

Lu [17] Bayesian network and decision tree It is very di�cult to accurately predict ight delays.

Lu et al. [18] Na��ve Bayes, decision tree, neural network Decision tree has the best performancepresenting a prediction con�dence of 70%.

Oza et al. [21] OneR algorithm Delays are predicted with 64.08% of accuracy.

Chen et al. [29] Fuzzy support vector machineFuzzy support vector machine with weightedmargin is more accurate than a standalonesupport vector machine.

- The state of the world, which indicates the availabledecisions, actions, or answers to an inference prob-lem occurring in the real world;

- An answer j 2 J to a problem in a prediction task,which is the prediction of a future observation;

- A utility function, which de�nes a reward for pre-dicting an unknown future observation;

- A speci�cation of a current belief about the stateof the world, which is described by a posteriorpredictive distribution.

The basic objective of these procedures is to detect thecorrelation between parameters and predictions of thefuture of a system. Machine learning is typically usedto predict the changes in systems that perform tasksassociated with arti�cial intelligence. Such tasks in-volve recognition, diagnosis, planning, and prediction,among other activities.

The literature presents various types of DMTs,which can be categorized into two groups [32]: Clas-si�cation techniques and cluster analysis techniques.Classi�cation methods include decision tree, Bayesianclassi�cation, rule-based classi�cation, support vectormachine, and lazy learners, whereas cluster analysismethods encompass clustering and partitioning meth-ods, hierarchical methods, density-based methods, andgrid-based approaches. From another point of view,DMTs can be classi�ed into supervised (predictive ordirected) and unsupervised (descriptive or undirected)methods. Classi�cation is a supervised data miningmethod, whereas clustering is an unsupervised form of

DMT. Both categories encompass functions that canidentify di�erent hidden patterns in large datasets.

In this work, we apply �ve methods of predictingairline delays, namely decision tree, random forests,Bayesian classi�cation, a clustering method of the K-means algorithm, and a hybrid method (decision treecombined with clustering approach).

3.1. Decision treeThe typical structure of a decision tree consists ofa root node, multiple branches, and a great numberof leaf nodes. In this approach, the user develops adecision tree incrementally by partitioning the datasetinto increasingly smaller subsets until reaching a treewith decision nodes and leaf nodes. In this tree, eachinternal node corresponds to a test on an attribute,each branch corresponds to a test result, and each leafnode represents a class label. The topmost node in thetree is the root node.

A typical decision tree that concerns the airline ight delay is shown in Figure 3. As indicated in the�gure, a scheduled departure is the root and some otherparameters, such as eet age and visibility distance, arethe leaves of the tree. The average age of the eet isabout 25 years. Although this age is older than theworld standard, it is the average age re ected in ourdatabase, because of sanctions in previous years.

3.2. Random forestRandom forest is a concept falling under the generaltechnique of random decision. This algorithm operatesby creating a group of decision trees at training timeand outputting the class that represents the mode of

Page 5: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

H. Khaksar and A. Sheikholeslami/Scientia Iranica, Transactions A: Civil Engineering 26 (2019) 2689{2702 2693

Figure 3. A typical decision tree for delay prediction.

classes or the mean prediction of the individual trees.Individual decision trees are generated using a randomselection of attributes at each node to determine split.During classi�cation, each tree casts a vote and themost popular class is returned. Using the randomforests, the variance can be reduced by averagingthe deep decision trees trained with di�erent partsof the training set. To form random forests, treepredictors should be integrated in a way that eachtree is dependent on the values of a random vectorsampled independently and uniformly from all trees inthe forest [33]. We use this approach to predict ightdelays in our database. Rebollo and Balakrishnan useda random forest algorithm to predict departure delaysof 2 to 24 hours in the NAS. Their results con�rmedthat random forests were suitable for predicting airlinedelays [20].

3.3. Bayesian classi�cationBeing an o�spring of Bayes's theorem, Bayesian clas-si�cation has shown desirable accuracy and speed inhandling large databases [32]. Bayesian classi�cation isdirected toward �nding the best j in a supposed space(J) across a given training dataset X (data on ightdelays). Accomplishing this necessitates identifyingan assumption with the highest probability in datasetX. The term p(j) is the prior probability or a prioriprobability of J (delay occurrence). p(X) is the priorprobability of X and p(Xjj) is the posterior probabilityof X conditioned on j.

Bayes' rule can be used to obtain expressions forp(jjX) in terms of p(Xjj), which is assumed to beknown (or estimable):

p(jjX) =p(Xjj)p(j)p(X)

: (1)

In learning scenarios, such as those featuring the pre-diction of ight delays, a learning algorithm considersthe assumptions that underlie J and tries to �ndassumption j of J with the maximum probability

of occurrence (or the assumption with the highestlikelihood of occurrence). The Maximum A Posteriori(MAP) is an assumption with the maximum likelihoodthat is calculated using Bayes' rule and the posteriorprobability:

hMAP = argj2JP (jjX) = argj2J maxP (Xjj)P (j)

P (X)

= argj2JP (Xjj)P (j): (2)

The class of the newly derived sample is then predictedby Bayesian classi�cation. Thus, the class with thehighest likelihood of occurrence (or VMAP) is computedby identifying a1; a2; :::; an:

vMAP = argvj2V maxP (vj ja1; a2; � � � ; an): (3)

In Eq. (3), vMAP is the value with the maximumlikelihood of occurrence and a1; a2; :::; an are the valuesof each attribute.

Rewriting the formulation in Bayes' rule yieldsthe following:

vMAP = argvj2V maxP (a1; a2; � � � ; anjvj)P (vj)

p(a1; a2; � � � ; an)

= argvj2V maxP (a1; a2; � � � ; anjvj)P (vj): (4)

The occurrence probability of a1; a2; :::; an is calculatedby multiplying each of the classes.

vNB = argvj2V maxP (vj)�ip(aijvj): (5)

In this relationship, vNB is the output of the Bayesclassi�cation. The number of P (aj jvj) terms that arecalculated in this procedure is equal to the number ofclasses multiplied by the number of outputs, which isless than the number of P (a1; a2; � � � ; anjvj) terms.

3.4. K-means clusteringAnother approach used to predict ight delays isclustering, which comes in various types, such as K-medoids and K-means. We use the K-means methodthat is a type of partitioning approach because of itssimplicity, rapid operation, and consequent applica-bility to large datasets. Nevertheless, this methodhas three limitations, namely handling empty clusters,measuring the sum of a square error higher than thatencountered in the real world, and reducing the sumof a square with postprocessing. We resolve theseshortcomings by using the methodology proposed bySingh et al. [34]. Some studies reported good resultswith the use of the K-means algorithm, evaluating itas one of the best clustering algorithms available [35].In the algorithm, there is a set of d-dimensional realvectors of observations (x1; x2; � � � ; xn) ( ight delays),in which cj is the mean or weighted average of each

Page 6: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

2694 H. Khaksar and A. Sheikholeslami/Scientia Iranica, Transactions A: Civil Engineering 26 (2019) 2689{2702

Figure 4. Process of K-means algorithm.

cluster. In the K-means algorithm, n observations willbe divided into k sets in such a way as to minimize theCluster Sum of Square Error (CSSE).

min CSSE =X

j=1 to k

Xxi2Cj kxi � cjk

2: (6)

Figure 4 illustrates the process underlying the applica-tion of the K-means algorithm. First, k (the number ofdata classes) is determined on the basis of the natureof a database and the experience of a user. In thisresearch, classes are set on the basis of the delays ofeach ight and the center of each cluster is calculatedusing the formulation below:

Ct+1j =

1jSij

Xk;xk2Si

xk; (7)

where Ct+1j denotes the new center of the cluster, t+ 1

represents a new class in the cluster, Si is the ithset of the cluster, and xk is the kth member of seti. Second, the distance of objects (delays) to eachcentroid is calculated and the objects are grouped invarious clusters in accordance with their distance to thecenters. The process is repeated until the members ofthe clusters di�er from those in the previous iteration.

3.5. Hybrid approachClustering analysis is an important and commonlyused data analysis technique. It can be used todescribe a dataset and a decision tree can be applied toanalyze the dataset. To improve the results of isolatedapproaches, we use a hybrid approach, which is adecision tree based on the clustering algorithm. In thismethod, clustering is adopted as a down-sampling pre-process for classi�cation to reduce the size of a trainingset. The result is reduced dimensionality and a smaller,less complex classi�cation problem that is easier and

faster to solve. Thus, a decision tree that uses K-meansclustering for classi�cation is generated on the basisof the assumption that each cluster corresponds to aclass. Such classi�cation and assumption are adoptedin this work. The process underlying the hybridapproach is shown in Figure 5. First, the usage andinteraction of data are preprocessed. Then, an optionalattribute selection process is applied to selecting only agroup of attributes/variables or using all the availableattributes/variables. Finally, a clustering algorithm isexecuted using training data. An essential requirementis to ensure that the number of generated clusters is thesame as the number of class labels in a dataset. This

Figure 5. Process of hybrid approach.

Page 7: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

H. Khaksar and A. Sheikholeslami/Scientia Iranica, Transactions A: Civil Engineering 26 (2019) 2689{2702 2695

identicality guarantees the derivation of a useful modelthat relates each cluster to one class.

4. Methodology

The proposed approaches were used to predict the ightdelays of a large airline in Iran. Steps were taken totest the proposed approaches on the real-world data,which are presented in Figure 6. The �rst steps of theFDP conducted in this work were data preprocessingand feature selection. The ight dataset on the Iranianairline is very large; thus, analyzing it requires datapreparation (data preprocessing is described in thenext section). Another preprocessing task was theselection of e�ective variables from among varioustypes of data, after which ight delays were predictedusing decision tree, cluster, hybrid, random forest, andBayesian classi�cation. In the third step, the proposedapproaches were evaluated and the best approach toFDP was determined through the comparison andveri�cation of the approaches. This process was carriedout two times; that is, delay occurrence and then delaymagnitude were determined via FDP.

4.1. Data preprocessingAirline datasets are huge and increasingly large interms of the number of dimensions and instances. Anessential step, therefore, is data preprocessing, whichincludes the tasks of data cleaning and data integra-tion. We used an SQL data warehouse to manage ourdatabase. Table 2 describes the datasets and Table 3shows the parameters of our model for the US andIranian networks. Data on the US ight networkand the weather conditions were obtained from [11]and [36]. On the basis of Table 3, the parameters that

Table 2. Description of data used in the model.

Description

Title Irannetwork

The USnetwork

Time span 16 months 6 monthsNumber of airports 52 278Number of aircrafts 35 |Number of aicrcaft types 9 |O-D pairs 96 5346Number of operations 15428 2825647

contribute to ight delays can be classi�ed into seasonaltrends and random residuals. Seasonal trends includeseasonal demand changes, weather e�ects, and otherseasonal factors. Seasonal demand changes encompassdates and days of the week. The meteorological condi-tions of ights were acquired from the Islamic Republicof Iran Meteorological Organization (IRIMO). Suchconditions are related to visibility, which is a measureof the distance at which an object or light can beclearly distinguished. Other associated parametersinclude station pressure, temperature, and wind speed.Random residuals revolve around ight-related param-eters, such as ight number, sector number, scheduleddeparture time, and aircraft type and age. Otherfactors associated with random residuals are origin anddestination.

4.2. Feature selectionA good understanding of feature selection is con-siderably advantageous in that it leads to improvedmodel execution and enhanced understanding of theunderlying structure and characteristics of the data.

Figure 6. Process of FDP.

Page 8: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

2696 H. Khaksar and A. Sheikholeslami/Scientia Iranica, Transactions A: Civil Engineering 26 (2019) 2689{2702

Table 3. Variables that are used in data mining.

Category of delay The US network Iran network

Seasonal trend

Visibility of origin and destination Visibility of origin and destinationTemperature of origin and destination Temperature of origin and destinationStation pressure of origin and destination Station pressure of origin and destinationWind speed of origin and destination Wind speed of origin and destinationDate DateDay of week Day of week

Random residuals

Unique carrier Flight numberOrigin city market ID Number of sectorsScheduled departure time Scheduled departure timeDestination city market ID Type of aircraft

Age of aircraftOrigin

Figure 7. E�ects of the variables on delay based on thecorrelation matrix (the US network).

In this step, the correlation between each param-eter and delays was determined using a correlation ma-trix. The outputs of the matrix are shown in Figures 7and 8. Using a correlation matrix is a statistical tech-nique that provides the correlations between multiplevariables and consist of the coe�cients of correlationbetween each variable and others. Put di�erently, itshows the relationship between two variables and themagnitude of this relationship. Matrix elements arecorrelation values that can vary from �1 to +1. Apositive quantity shows a direct relationship betweentwo variables, whereas a negative value for the cor-relation implies a negative or inverse association [37].On the basis of the US network dataset, scheduleddeparture time, visibility of origin and destination,and wind speed at origin and destination exert thehighest e�ects on ight delays in the US network

Figure 8. E�ects of the variables on delay based on thecorrelation matrix (Iran network).

(Figure 6). To accurately estimate ight delays, weused the aforementioned result to select the variablesfor use in our proposed methods. On the basis of theIranian dataset, eet age, scheduled departure time,aircraft type, and average station pressure stronglya�ect ight delays in the Iranian network (Figure 8).Weather conditions may be e�ective as parametricbases for predicting ight delays around the world, butparameters such as eet speci�cation and scheduleddeparture time are more e�ective for predictions in theIranian context. The age of aircraft eet in Iran is olderthan the standard, and congestion problems duringpeak hours may cause ight delays in Iranian airports.Therefore, the eet age and scheduled departure time

Page 9: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

H. Khaksar and A. Sheikholeslami/Scientia Iranica, Transactions A: Civil Engineering 26 (2019) 2689{2702 2697

Figure 9. E�ects of the age of the eet on the ightdelays.

Figure 10. E�ects of the visibility of destination on the ight delays.

are two e�ective parameters in ight delays in Iraniannetwork.

The e�ects of eet age on delays in the Iraniannetwork are illustrated in Figure 9, which indicates thatolder eets experience more delays than do younger eets because of maintenance issue. The e�ects ofvisibility distance on delays in the Iranian network arepresented in Figure 10, which shows that airports withlow visibility distances experience more delays.

4.3. Improving the classi�cation forimbalanced data

The databases treated in this work are imbalancedin nature, and records on delay magnitude are rare.The term \imbalanced dataset" refers to any datasetthat contains a particularly rare class with signi�-cantly greater degree of importance than other classes.In an imbalanced dataset, the class with a highernumber of instances is called a major class, whereasthat having a relatively lower number of instancesis referred to as a minor class. In our databases, ights with delays belong to the minor class, thuscompelling us to use a sampling technique to solvethis problem. Sampling is an e�ective approach tosolving imbalanced data. Conventional classi�cationmethods perform poorly when a dataset is imbalanced,because such methods disregard class imbalance intheir operations. Classic approaches treat data inthe same manner, regardless of whether they belongto common or minority classes. They are aimed atoptimizing overall accuracy without consideration for

the relative distribution of each class [38]. Imbalanceddata diminish the generalization of machine learningresults. The speci�c sampling technique used in ourwork was Random Under-Sampling (RUS), which wasone of the best techniques available [39]. In RUS, in-stances of a majority class are randomly discarded froma dataset, and rare instances are copied and distributedacross the dataset. Thus, rare instances are intensi�edagainst common instances, resulting in slightly reducedtotal accuracy of results. Nevertheless, RUS resultsare reliable. Foregoing a sampling technique wouldmean more accurate data mining, but the accuracy ofpredicting the number of rare instances will be zero. Inthe airline industry, ights with delays are somewhatrare. Our application of RUS was intended to improveour results and achieve reliable prediction.

5. Experimental results

The proposed approaches were applied in actual airlinenetworks, after which the results were compared to �ndthe best solution. We used a machine learning analyticsprogram called RapidMiner, which provided an inte-grated environment for data preprocessing, machinelearning, deep learning, text mining, and predictiveanalytics [40]. We partitioned the data into testing(25%) and training (75%) sets.

5.1. Decision treeWe used the J48 pruned tree to estimate ight delayson the basis of the airline databases because of its goode�ciency and accuracy [41]. J48 is a univariate decisiontree, in which splitting is performed by one attribute atinternal nodes. This method can assign or predict thetarget value of a new instance by checking all respectiveattributes and their values against those seen in thedecision tree model. We carried out online pruning(performed during tree creation) to handle outliers andidentify over�tting and subsets of instances that werepoorly de�ned. The results are shown in Tables 3and 4. The proposed decision tree approach exhibitedaccuracy levels of 70.87% and 64.28% in predictingdelay occurrence in the US and Iranian networks,respectively. The method achieved accuracy levelsof 63.89% and 70.79% in predicting delay magnitudein the US and Iranian networks, respectively. Classprediction shows a fraction of retrieved instances thatare relevant. The precision of class prediction viadecision tree ranged from 48.69% to 68.43% and 66.44%to 72.66% for various magnitudes of delays in theUS and Iranian networks, respectively. Recall is thefraction of relevant instances that are retrieved. Classrecall via decision tree ranged from 53.86% to 73.19%and 55.98% to 91.24% for the US and Iranian networks,respectively.

Page 10: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

2698 H. Khaksar and A. Sheikholeslami/Scientia Iranica, Transactions A: Civil Engineering 26 (2019) 2689{2702

Table 4. Accuracy of ight delay occurrence and magnitude prediction.

Network The US network Iran network

Predictionmethod

Accuracyof delay

occurrenceprediction

(%)

Accuracyof delay

magnitudeprediction

(%)

Accuracyof delay

occurrenceprediction

(%)

Accuracyof delay

magnitudeprediction

(%)J48 pruned tree approach 64.28 63.89 70.87 70.79Cluster classi�cation approach 62.27 61.37 69.63 68.84Hybrid approach 71.39 70.16 76.44 75.93Bayesian approach 61.35 60.78 70.17 69.81Random forest approach 67.43 66.27 72.11 71.23

Table 5. Accuracy of ight delay magnitude prediction in di�erent classes.

Network The US network Iran network

Predictionmethod

Class ranges(minute)

Accuracy of delaymagnitude prediction (%)

Accuracy of delaymagnitude prediction (%)

Classprecision

Classrecall

Classprecision

Classrecall

J48 prunedtree approach

0-15 68.43 73.19 71.57 60.1115-60 59.21 60.10 66.44 55.98> 60 48.69 53.86 72.66 91.24

Clusterclassi�cation

approach

0-15 58.15 64.19 68.75 55.3115-60 53.27 58.49 62.63 56.36> 60 59.51 50.07 72.26 88.99

Hybridapproach

0-15 79.37 82.18 75.96 68.7015-60 60.28 68.81 74.00 64.35> 60 62.23 60.19 77.01 90.54

Bayesianapproach

0-15 56.54 62.57 76.35 51.6915-60 51.94 56.95 64.82 58.02> 60 58.36 48.61 69.74 94.01

Randomforest

approach

0-15 69.18 73.21 67.26 66.0915-60 58.76 60.48 65.00 56.52> 60 51.37 52.34 75.15 83.78

5.2. Cluster classi�cationThe results of cluster classi�cation via the K-meansalgorithm are displayed in Tables 4 and 5. The algo-rithm performed with accuracies of 62.27% and 69.63%in predicting delay occurrence in the US and Iraniannetworks, respectively. It performed with accuracies of61.37% and 68.84% in predicting delay magnitude inthe US and Iranian networks, respectively. Class pre-cision via the algorithm ranged from 53.27% to 59.51%and 62.63% to 72.26% for various magnitudes of delay

in the US and Iranian networks, respectively. Classrecall ranged from 55.31% to 88.99% and 50.07% to64.19% for the US and Iranian networks, respectively.As can be seen, the decision tree generated results thatwere superior to those of the cluster classi�cation.

5.3. Hybrid approachIn this approach, we combined the decision tree withcluster classi�cation approach (i.e., the J48 decisiontree algorithm and the K-means algorithm). The

Page 11: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

H. Khaksar and A. Sheikholeslami/Scientia Iranica, Transactions A: Civil Engineering 26 (2019) 2689{2702 2699

results are provided in Tables 4 and 5. The hybrid ap-proach exhibited accuracy levels of 71.39% and 76.44%in delay occurrence prediction for the US and Iraniannetworks, respectively. Its accuracy levels were 70.16%and 75.93% in predicting delay magnitude in the USand Iranian networks, respectively. Class precisionwas in the ranges of 60.19% to 82.18% and 64.35% to90.54% for various magnitudes of delay in the US andIranian networks, respectively. Class recall fell in theranges of 60.28% to 79.37% and 74.00% to 77.01% forthe US and Iranian networks, respectively. The resultsof the hybrid approach are superior to those of all theother methods.

5.4. Bayesian classi�cationThe Bayesian classi�cation results are also shownTables 4 and 5. Its accuracy levels were 61.35% and70.17% in predicting delay occurrence and 60.78% and69.81% in predicting delay magnitude in the US andIranian networks, respectively. Class precision rangedfrom 51.94% to 58.36% and 64.82% to 76.35% forvarious magnitudes of delays, and class recall rangedfrom 48.61% to 62.57% and 51.69% to 94.01% for theUS and Iranian networks, respectively.

5.5. Random forest methodThe results of the random forest algorithm are listedTables 4 and 5. The algorithm achieved accuracy levelsof 67.43% and 72.11% in predicting delay occurrenceand 66.27% and 71.23% in predicting delay magnitudein the US and Iranian networks, respectively. Classprecision was in the ranges of 51.37% to 69.18% and65.00% to 75.15% for various magnitudes of delays, andclass recall fell in the ranges of 52.34% to 73.21% and56.52% to 83.78% for the US and Iranian networks,respectively.

5.6. DiscussionWe compared the results of the proposed approachesand veri�ed the �ndings on the basis of parameters suchas class precision and class recall. The outputs of allthe methods are shown in Tables 6 and 7 and Figures 11and 12 for the US and Iranian networks, respectively.Among the approaches, the hybrid method producedthe best results, having minimum class recall of 60.19%for the US network and 64.35% for the Iranian network.Class recall is an important parameter that determinesthe reliability of results. The accuracy levels of thehybrid approach were 71.39% and 76.44% in predictingdelay occurrence and 70.16% and 75.93% in predicting

Table 6. Comparison of various approaches (the US network).

Delay occurrence The magnitude of delay

Approach Accuracy(%)

Accuracy(%)

Class recall (%) Class precision (%)Min Max Min Max

Decision tree 64.28 63.89 53.86 73.19 48.69 68.43Cluster classi�cation 62.27 61.37 50.07 64.19 53.27 59.51Hybrid method(decision tree combinedwith cluster classi�cation)

71.39 70.16 60.19 82.18 60.28 79.37

Bayesian approach 61.35 60.78 48.61 62.57 51.94 58.36Random forest 67.43 66.27 52.34 73.21 51.37 69.18

Table 7. Comparison of various approaches (Iran network).

Delay occurrence The magnitude of delay

Approach Accuracy(%)

Accuracy(%)

Class recall (%) Class precision (%)Min Max Min Max

Decision tree 70.87 70.79 55.98 91.24 66.44 72.66Cluster classi�cation 69.63 68.84 55.31 88.99 62.63 72.26Hybrid method(decision tree combinedwith cluster classi�cation)

76.44 75.93 64.35 94.54 74.00 77.01

Bayesian approach 70.17 69.81 51.69 94.01 64.82 76.35Random forest 72.11 71.23 56.52 83.78 65.00 75.15

Page 12: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

2700 H. Khaksar and A. Sheikholeslami/Scientia Iranica, Transactions A: Civil Engineering 26 (2019) 2689{2702

Figure 11. Comparison of various approaches (the USnetwork).

Figure 12. Comparison of various approaches (Irannetwork).

delay magnitude in the US and Iranian networks,respectively. Class precision ranged from 60.28% to79.37% and 74.00% to 77.01% for the US and Iraniannetworks, respectively. These values were the highestamong the approaches. Although we also modeled apublic database of the US network, the Iranian networkis special because of the situation of the country. Ourresults showed that the proposed model could predictdelays occurring the US network at an accuracy of70%, which was a reasonable level. It could predictdelays in the Iranian network at an accuracy of 75%.

Figure 13. Predicting e�ect of the age of the eet ondelays.

Moreover, weather conditions are very important indelays in the US network, whereas eet age and eettype are more signi�cant in the Iranian network. Aspreviously indicated, eet age and eet type in Iran areof lower quality than the standard because of sanctionsin previous years and maintenance issues. The e�ectsof eet age on the Iranian network are illustratedin Figure 13. The FDP results indicated that olderairplanes experienced more delays (Figure 8).

6. Conclusions and recommendations

FDP methods, namely decision tree, cluster, Bayesian,random forest, and hybrid classi�cation, were proposedin this research. These approaches were examinedon the basis of real datasets on US and Iranian ight networks. The results indicated that the hybridapproach exhibited a performance superior to those ofthe other methods and was therefore adopted as theFDP model. Parameters such as eet age and aircrafttype exert strong e�ects on ight delays in the Iraniannetwork, whereas weather conditions strongly in uence ight delays in the US network. The accuracy levelsof the hybrid approach were 71.39% and 76.44% inpredicting delay occurrence and 70.16% and 75.93%in predicting delay magnitude in the US and Iraniannetworks, respectively. These results may be of inter-est to airlines that want to implement measures forpreventing delay propagation, especially those basedin developing countries, such as Iran.

For the future studies, researchers can implementother exciting data mining methods and compare theresults. The proposed combined method of delayanticipation and its results can also be further exploredin other studies. For example, combing the hybridmethod with robust ight scheduling shows potentialas an interesting research direction.

References

1. Barnhart, C. and Smith, B. \Quantitative problemsolving methods in the airline industry", InternationalSeries in Operation Research & Management Science,Springer Science + Business Media, LLC (2012).

Page 13: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

H. Khaksar and A. Sheikholeslami/Scientia Iranica, Transactions A: Civil Engineering 26 (2019) 2689{2702 2701

2. Ball, M., Barnhart, C., and Drenser, M., Total DelayImpact Study, The National Center of Excellence forAviation Operation Research (2010).

3. Bazargan, M., Airline Operations and Scheduling,MPG Book Group, 2th Ed., UK (2010).

4. Barnhart, C. and Amy, C. \Airline schedule planning:accomplishments and opportunities", Manufacturing& Service Operations Management, 6(1), pp. 3-22(2004).

5. Gopalakrishnan, B. and Johnson, E.L. \Airline crewscheduling: state-of-the-art", Annals of OperationsResearch, 140, pp. 305-337 (2005).

6. Sherali, H.D., Bish. E.K., and Zhu, X. \Airline eetassignment concepts, models, and algorithms", Euro-pean Journal of Operational Research, 172, pp. 1-30(2005).

7. Listes, O. and Dekker, R. \A scenario aggregation-based approach for determining a robust airline eetcomposition for dynamic capacity allocation", Trans-portation Science, 39(3), pp. 367-382 (2005).

8. Akartunal, K., Boland, N., Evans, I., Wallace, M., andWaterer, H. \Airline planning benchmark problems-part II: passenger groups, utility and demand alloca-tion", Computers & Operations Research, 40, pp. 793-804 (2013).

9. Kohla, N., Larsen, A., Larsen, J., Ross, A.,and Tiourine S. \Airline disruption management-perspectives, experiences and outlook", Journal of AirTransport Management, 13, pp. 149-162 (2007).

10. Clausena, J., Larsen, A., Larsen, J., and Rezanova,N.J. \Disruption management in the airline industry-concepts, models and methods", Computers & Opera-tions Research, 37, pp. 809- 821 (2010).

11. http://www.transtats.bts.gov/OT Delay/OT DelayCause1.asp.

12. Transportation Research Board \De�ning and mea-suring aircraft delay and airport capacity thresholds",ACRP Report 104 (2014).

13. Tu, Y., Ball, M., and Jank, W. \Estimating ightdeparture delay distributions -a statistical approachwith long-term trend and short-term pattern", Journalof the American Statistical Association, 103, pp. 112-125 (2008).

14. Mueller, E.R. and Chatterji, G.B. \Analysis of aircraftarrival and departure delay characteristics", Proceed-ing of the 2th AIAA's Aircraft Technology, Integration,and Operations (ATIO) Conference, Los Angeles, Cal-ifornia, USA (2002).

15. Avijit, M., Lovell, D.J., Ball, M.O., Odoni, A.R., andZerbib, G. \Modeling delays and cancellation proba-bilities to support strategic simulations", Proceedingsof the 6th Air Tra�c Management Research and De-velopment Seminar, Baltimore, MD, USA (2005).

16. Sridhar, B., Wang, Y., Klein, A., and Jehlen, R. \Mod-eling ight delays and cancellations at the national,regional and airport levels in the United States", Pro-ceedings of the 9th Air Tra�c Management Researchand Development Seminar, Berlin, Germany (2011).

17. Lu, Z., Alarming Large Scale of Flight Delays: AnApplication of Machine Learning, Machine Learning.In Tech publishing, pp. 239-250 (2010).

18. Lu, Z., Wang, J., and Zheng, G. \A new method toalarm large scale of ights delay based on machinelearning, in knowledge acquisition and modeling",KAM '08. International Symposium on, pp. 589-592(Dec. 2008).

19. Bola~nos, M.E. and Murphy, D. \How much delay doesNew York inject into the national airspace system?A graph theory analysis", Proceeding of the 11thAIAA's Aircraft Technology, Integration, and Oper-ations (ATIO) Conference; Los Angeles, California,USA (2013).

20. Rebollo, J.J. and Balakrishnan, H. \Characterizationand prediction of air tra�c delays", TransportationResearch Part C, 44, pp. 231-241 (2014).

21. Oza, S., Sharma, S., Sangoi, H., Raut, R., and Kotak,V.C. \Flight delay prediction system using weightedmultiple linear regression", International Journal ofEngineering and Computer Science, 4(4), pp. 11668-11677 (2015).

22. Allan, S.S., Gaddy, S.G., and Evans, J.E., DelayCausality and Reduction at the New York City AirportUsing Terminal Weather Information, MassachusettInstitute of Technology (2011).

23. Wu, C. \Inherent delays and operational of airlineschedules", Journal of Air Transportation Manage-ment, 11(4), pp. 273-282 (2005).

24. Wang, P., Schaefer, L., and Wojcik, L. \Flight con-nections and their impacts on delay propagation",Technical Report, MITRE (2003).

25. Janic, M. \Modeling the large scale disruption of anairline network", Journal of Transportation Engineer-ing, 131(4), pp. 249-260 (2005).

26. Hsiao, C. and Hansen, M. \An econometric analysisof us airline ight delays with time-of-day e�ects",Proceedings of TRB 2006 Annual Meeting (2006).

27. Rupp, N. \Investigating the causes of ight delays",Working paper, Department of Economics, East Car-olina University (2007).

28. Boswell, S.B. and Evans, J.E. \Analysis of downstreamimpacts of air tra�c delay", Lincoln Laboratory, Mas-sachusetts Institute of Technology (1997).

29. Chen, H., Wang, J., and Yan, X. \A fuzzy support vec-tor machine with weighted margin for ight delay earlywarning", In Fuzzy Systems and Knowledge Discovery,2008. FSKD '08. Fifth International Conference on, 3,PP. 331-335 (Oct. 2008).

30. Liao, S.H., Chu, P.H., and Hsiao, P.Y. \Data miningtechniques and applications - A decade review from2000 to 2011", Expert Systems with Applications, 39,pp. 11303-11311 (2012).

Page 14: Airline delay prediction by machine learning algorithmsscientiairanica.sharif.edu/article_20020_d43b2e5c29cb07... · 2020-05-21 · Airline delay prediction by machine learning algorithms

2702 H. Khaksar and A. Sheikholeslami/Scientia Iranica, Transactions A: Civil Engineering 26 (2019) 2689{2702

31. Vehtari, A. and Ojanen, J. \A survey of Bayesianpredictive methods for model assessment, selection andcomparison", Statistics Surveys, 6, pp. 142-228 (2012).

32. Han, J., Kamber, M., and Pei, J., Data Mining Con-cepts and Techniques, Morgan Kaufmann Publishers,3th Ed. (2012).

33. Breiman, L. \Random forests", Machine Learning,45(1), pp. 5-35 (2001).

34. Singh, K., Malik, D., and Sharma, N. \Evolvinglimitations in K-means algorithm in data miningand their removal", IJCEM International Journal ofComputational Engineering & Management, 12(1), pp.105-109 (2011).

35. Abbas, O.A. \Comparisons between data clusteringalgorithms", The International Arab Journal of Infor-mation Technology, 5(3), pp. 320-325 (2008).

36. https://www.wunderground.com.37. Liu, Y., Yu, X., and Huang, J.X. \Combining in-

tegrated sampling with SVM ensembles for learningfrom imbalanced datasets", Information Processing &Management, 47(4), pp. 617-631 (2011).

38. Mirkin, B. \Core concepts in data analysis:summarization, correlation and visualization",Springer: Verlag London Limited: Available fromResearchgate:http://www.researchgate.net/ pro�le/Boris Mirkin/publication/232282057 Core Concepts in Data Anal-ysis Summarization Correlation and Visualization/links/0912f51090564b6e36000000.pdf (2011).

39. Maimon, O. and Rokachm, L. Data Mining and Knowl-edge Discovery Handbook, Springer, pp. 853-867, ISBN:978-0-387-24435-8 (Print), 978-0-387-25465-4 (Online)(2005).

40. https://rapidminer.com/41. Sharma, T.C., Jain, M., and abad, F. \WEKA ap-

proach for comparative study of classi�cation algo-rithm", International Journal of Advanced Research in

Computer and Communication Engineering, 2(4), pp.1925-1931 (2013).

Biographies

Hassan Khaksar is PhD candidate in the Departmentof Transportation Engineering and Planning, Schoolof Civil Engineering, Iran University of Science andTechnology (IUST). He received BSc in 2005 and MScin 2007 in Civil Engineering from IUST. He is doing thePhD thesis entitled \The Optimum Airline PlanningModel Based on Disruption Management and RobustPlanning." This research focuses on predicting andreduction of delays of airlines. He has publishedmore than 30 scienti�c paper in ISI journals andinternational conferences. His research interests areairline planning, airport managing, data mining, andoperation research.

Abdolrreza Sheikholeslami is Associate Professorin the Department of Transportation Engineering andPlanning, School of Civil Engineering, Iran Universityof Science and Technology (IUST). He received hisBSc and MSc degrees from IUST and his PhD de-gree in Transportation Engineering and Planning fromthe same university in 2006. His research interestsare transportation planning, transportation economics,airline scheduling, disruption management, data min-ing, railway scheduling, mathematical models, andoptimization techniques for designing transportationsystems. He was elected as the top student in thetechnical and engineering group in Iran in 2001. Heis experienced with more than 20 years of teaching atIUST. He has published more than 80 scienti�c papersin ISI journals and international conferences.