[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 
Predicting flight arrival delay using Azure SQL Database ML

 

 

Home
Analysis Services
Azure
CLR Integration
High Availability
Open Source
Security
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019
Tips
Troubleshooting
Tuning

Predicting flight arrival delay using Azure SQL Database ML.


Date created: August 31, 2019.
 

In this article, we will use Azure SQL Database Machine Learning Services to predict airline flight delays

For the purpose of this article, I used the airline delay sample dataset for the year 1987. We imported the sample data set to a table named Flight_Delays_Sample, then 80 percent of the sample data was separated on a table named Flight_Delays_Sample_TrainingTable and will be used on this article to train the model, the rest of the sample data was separated on a table named Flight_Delays_Sample_TestingTable to test the model.

For Azure SQL Database Machine Learning we don't need to enable scripts via system stored procedure sp_configure because once you are signed to enjoy the preview, machine learning is enabled for your Azure SQL database.

Since ML is already enable on the database, we just have to proceed to train the model. As you can see on below images we predict the arrival delay of airplane flights using the rxPredict function first, since our model is based on the rxLinMod algorithm provided as part of the RevoScaleR package. After that we will use the generic R predict function to make the same prediction.

Let's now create our first model version using the the rxLinMod algorithm.









Now let's use our first created model to predict flight delay using the rxPredict function.



 

We predicted the arrival delay of airplane flights based on the delay in arrival time (in minutes), the month of the flight, the day of the week of the flight, airport of departure and the scheduled departure time (FlightCRSDepTime).




Let's now create our second version model.



 






Let's finally use the traditional predict function to predict the flight delay with our second version of the model.

 





 

 

 

.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.