Skip to content

Machine learning–based Flight Ticket Price Prediction project that analyzes historical flight data to forecast ticket prices and support data-driven travel decisions.

Notifications You must be signed in to change notification settings

272006Sakshi/FlightTicketPrediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

AeroDataCompetition

✈️ Flight Price Prediction

📌 Project Overview

This project predicts flight ticket prices for Indian domestic flights (March–June 2019) using Machine Learning. We preprocess the dataset, engineer features, and train regression models to estimate flight prices based on various factors like airline, source, destination, duration, and stops.

🎯 Goal

Build a machine learning model to predict flight prices.

Perform feature engineering & preprocessing on categorical and time-based data.

Evaluate the model using MAE, RMSE, and R² Score.

📊 Dataset

The dataset contains details of domestic flights:

Airline – Name of the airline

Date_of_Journey – Journey date

Source & Destination – Boarding and arrival cities

Dep_Time & Arrival_Time – Departure and arrival times

Duration – Flight duration

Total_Stops – Number of stops

Price – Ticket price (Target variable)

🔗 (Add dataset link here if public, else mention it's provided for the competition/class assignment.)

⚙️ Tech Stack

Python 3

pandas, numpy – Data preprocessing

matplotlib, seaborn – Data visualization

scikit-learn – ML models, pipelines, hyperparameter tuning

🛠️ Steps Implemented

  1. Data Preprocessing

Converted Date_of_Journey, Dep_Time, Arrival_Time into day, month, hour, minute.

Encoded categorical variables (Airline, Source, Destination) using OneHotEncoder.

Dropped irrelevant columns (Route, Additional_Info).

  1. Feature Engineering

Extracted time features.

Converted flight duration into minutes.

Handled categorical & numerical features using ColumnTransformer.

  1. Model Training

Used RandomForestRegressor as baseline.

Applied GridSearchCV for hyperparameter tuning.

  1. Model Evaluation

Final model metrics:

MAE: 587.56

RMSE: 1359.65

R² Score: 0.91 ✅

🔮 Key Insights

Jet Airways Business has the highest average ticket price in the dataset.

Price depends heavily on airline, duration, and number of stops.

About

Machine learning–based Flight Ticket Price Prediction project that analyzes historical flight data to forecast ticket prices and support data-driven travel decisions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published