Using Different Machine Learning Algorithms to Predict the Prices of Flight Tickets




Machine Learning, Artificial Intelligence, Regression, Airlines, Dynamic Pricing, Flight Tickets, Inflation, Linear Regression, Ridge Regression, DecisionTree, ML Models


The rising prices of flight tickets and the lack of transparency in the dynamic pricing strategies of airlines have caused many consumers to wonder, what factors actually determine these prices. In order to investigate this question, a large dataset of flight ticket bookings that includes the most price-defining variables was acquired. This data was preprocessed using discretization, normalization, and principal component analysis. This preprocessed data was then used to train 5 different Machine Learning algorithms: Linear Regression, DecisionTree, Ridge Regression, RandomForest, and SVR. The training of the RandomForest and SVR models was not possible due to runtime errors, however, the other models trained as expected. All models performed well, with the Linear Regression and Ridge Regression performing identically. Overall, the DecisionTree model performed the best at predicting the prices of flights, and by adjusting hyperparameters the performance could be further increased. The investigation could be continued by using a larger dataset to investigate how the model performs with more variables and under broader conditions. Additionally, the model could be reappropriated to make a user-friendly flight price prediction tool that helps consumers with their purchasing decisions.


Download data is not yet available.

References or Bibliography

Allwright, Stephen. 2022. “MSE vs MAE, Which Is the Better Regression Metric?” Stephen Allwright. July 7, 2022.

Bathwal, Shubham. n.d. “Flight Price Prediction.”

Castillo, Dianne. 2021. “Machine Learning Regression Explained.” Seldon. October 29, 2021.

ChatGPT. 2023. “Response to ‘What Does It Mean, When My Linear Regression and Ridge Regression Model Perform the Exact Same Way?’” July 8, 2023.

“Decision Tree.” n.d. CORP-MIDS1 (MDS). Accessed July 8, 2023.

Fernando, Jason. 2021. “R-Squared Definition.” Investopedia. September 12, 2021.

Geisler Mesevage, Tobias. 2021. “What Is Data Preprocessing & What Are the Steps Involved?” MonkeyLearn Blog. May 24, 2021.

Hayward, Justin, Daniel Martínez Garbuno, and Pranjal Pande. 2020. “How Airline Ticket Pricing Works.” Simple Flying. October 22, 2020.

“How Linear Regression Algorithm Works—ArcGIS pro | Documentation.” n.d. Accessed July 8, 2023.

IBM. n.d. “What Is Supervised Learning? | IBM.” Accessed June 8, 2023.

“Linear Regression in Machine Learning - Javatpoint.” n.d. Accessed July 8, 2023.

Mark, Lois Alter. 2021. “This Is the Best Time to Buy Flights.” Reader’s Digest. December 6, 2021.

Numpy. 2009. “NumPy.” 2009.

Nyuytiymbiy, Kizito. 2022. “Parameters and Hyperparameters in Machine Learning and Deep Learning.” Medium. January 15, 2022.

Pandas. 2018. “Python Data Analysis Library — Pandas: Python Data Analysis Library.” 2018.

scikit-learn. 2019. “Scikit-Learn: Machine Learning in Python.” 2019.

“Sklearn.svm.SVR — Scikit-Learn 0.23.1 Documentation.” n.d. Accessed July 9, 2023.

Willaert, Jorrit. 2021. “How to Calculate the Mean and Standard Deviation — Normalizing Datasets in Pytorch.” Medium. Towards Data Science. September 24, 2021.,channel%20is%20normalized%20this%20way.



How to Cite

Bollack, J. R., & Vincent, J. A. (2023). Using Different Machine Learning Algorithms to Predict the Prices of Flight Tickets. Journal of Student Research, 12(4).



HS Research Projects