🚀 A Machine Learning powered web application built using Streamlit to predict flight ticket prices and compare multiple regression models in real time.
🔗 Live App:
👉 https://flypredict.streamlit.app/
FlyPredict is an end-to-end Predictive Analytics & Machine Learning project that predicts airline ticket prices using real-world features such as:
- Airline
- Source & Destination
- Departure & Arrival Time
- Number of Stops
- Travel Class
- Journey Duration
- Days Left for Booking
This project demonstrates:
- Complete ML pipeline from preprocessing to deployment
- Multi-model comparison
- Interactive visual dashboards
- A production-ready Streamlit application
This project follows a structured machine learning workflow:
- Importing Libraries – Essential Python libraries imported
- Loading the Dataset – Cleaned flight dataset loaded
- Data Preprocessing – Handling missing values & removing unwanted columns
- Feature Engineering – Encoding categorical features
- Exploratory Data Analysis (EDA) – Data visualization & pattern analysis
- Splitting Data – Train-test split
- Model Training – Training multiple regression models
- Model Evaluation – Performance evaluation using metrics
- Model Comparison – Selecting the best performing model
- Feature Importance – Identifying key influencing factors
- Predictions – Manual input-based prediction
- Conclusion – Final insights and recommendations
| Model | Description |
|---|---|
| ✅ Random Forest Regressor | High-accuracy ensemble model |
| ✅ K-Nearest Neighbors (KNN) | Pattern-based prediction |
| ✅ Decision Tree Regressor | Rule-based learning |
| ✅ Linear Regression | Baseline comparison model |
✅ All models are optimized for:
- Small file size
- Fast prediction
- GitHub & Streamlit Cloud compatibility
✅ Real-time flight fare prediction
✅ Comparison of 4 ML models
✅ Interactive dark-themed UI
✅ Route, airline, class & timing based prediction
✅ Market insights & analytics
✅ Optimized model size for deployment
✅ Streamlit Cloud ready
FlyPredict/
│
├── Config/
│ └── feature_order.json
│
├── Dataset/
│ └── Clean_Dataset.csv
│
├── Models/
│ ├── model_rf.pkl
│ ├── model_dt.pkl
│ ├── model_knn.pkl
│ ├── model_lr.pkl
│ ├── encoders.pkl
│ └── scaler.pkl
│
├── app.py
├── FlightFarePrediction.ipynb
├── requirements.txt
└── README.md
- Python
- Streamlit
- Pandas
- NumPy
- Scikit-learn
- Plotly
- Joblib
- Airline Market Share
- Flight Class Distribution
- Price Distribution by Airline
- Booking Day vs Price Trend
- Duration vs Price Scatter Plot
- Model-wise Price Comparison
git clone https://github.com/your-username/FlyPredict.git
cd FlyPredictpython -m venv venv
venv\Scripts\activatepip install -r requirements.txtstreamlit run app.pyAyush Kumar 🎓 B.Tech CSE – Lovely Professional University 📊 Aspiring Data Analyst & Machine Learning Enthusiast
If you like this project, consider giving it a ⭐ on GitHub!
This project is licensed under the MIT License.