Skip to content

nightwing02/Flight-Fare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flight Fare Prediction

This project focuses on predicting flight fares using machine learning techniques. It encompasses the necessary steps to preprocess the data, including encoding categorical data to numerical, training a model, storing it using Pickle, and deploying it on Flask to create a web application for flight fare prediction.

Dataset

The flight fare dataset used in this project contains various features related to flights, such as departure and arrival locations, date and time of travel, airline information, and other relevant details. The dataset has been preprocessed to handle missing values, perform feature engineering, and encode categorical data into numerical format.

Data Preprocessing

To ensure optimal model performance, the dataset has undergone preprocessing steps. Categorical features have been encoded into numerical format using techniques like one-hot encoding, label encoding, or target encoding. Missing values have been handled appropriately, and feature engineering techniques may have been applied to create additional meaningful features.

Model Training

The flight fare prediction model has been trained using machine learning algorithms, such as random forests, gradient boosting, or regression models. The preprocessed dataset has been split into training and testing sets, and model hyperparameters have been tuned to achieve the best possible performance.

Model Persistence with Pickle

The trained model has been serialized and stored using Pickle, a Python library for object serialization. The serialized model file is utilized for prediction in the Flask web application.

Flask Web Application

The Flask framework has been leveraged to develop a web application that enables users to input flight details and obtain a prediction of the fare for their desired flight. The serialized model is loaded into the application and used to make real-time predictions based on user inputs.

Prerequisites

To run the Flight Fare Prediction project locally, you need to have the following dependencies installed:

  • Python 3.x
  • Flask
  • Scikit-learn
  • Pandas
  • Pickle

Usage

  1. Clone the repository:
git clone https://github.com/your-username/flight-fare-prediction.git
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Start the Flask web application:
python app.py
  1. Access the web application in your browser at http://localhost:5000.

  2. Enter the flight details in the provided form and submit it to obtain the fare prediction.

Future Improvements

  • Incorporate additional data sources, such as weather information or historical flight data, to enhance the accuracy of fare predictions.
  • Implement advanced feature engineering techniques to extract more meaningful information from the available flight data.
  • Enhance the user interface and add additional functionalities to the web application.
  • Integrate with a database for storing user data and maintaining a history of fare predictions.

Feel free to contribute to this project by submitting bug reports, feature requests, or pull requests.

License

This project is licensed under the MIT License.

Acknowledgments

  • The flight fare dataset obtained from sklearn.dataset.
  • Flask: A lightweight web application framework for Python.
  • Scikit-learn: A powerful machine learning library in Python.
  • Pandas: A versatile data manipulation library in Python.
  • Pickle: A Python module for object serialization.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages