You are on page 1of 65

FLIGHT FARE PREDICTION SYSTEM

A PROJECT REPORT

Submitted by

DEEPAK RAM R (312819104020)

JEROME J (312819104037)

MOHAMED TAHAMEERAN R (312819104048)

in partial fulfillment for the award of the degree


of
BACHELOR OF ENGINEERING
in
COMPUTER SCIENCE AND ENGINEERING

AGNI COLLEGE OF TECHNOLOGY, THALAMBUR

ANNA UNIVERSITY :: CHENNAI 600 025

MAY 2023
ANNA UNIVERSITY: CHENNAI 600 025
BONAFIDE CERTIFICATE

Certified that this project report “FLIGHT FARE PREDICTION SYSTEM”


is the bonafide work of “DEEPAK RAM R (312819104020), JEROME J
(312819104037), MOHAMED TAHAMEERAN R (312819104048)” who carried
out the project work under my supervision.

SIGNATURE SIGNATURE
Dr. L. Sharmila M.E., Ph.D Mrs. G. UMADEVI M.E.,
HEAD OF THE DEPARTMENT SUPERVISOR

Professor Assistant Professor


Department of Computer Science Department of Computer Science
and Engineering, and Engineering,
Agni College of Technology, Agni College of Technology,
Thalambur , Thalambur ,
Chennai-600 130. Chennai-600 130.

Submitted for the University project and Viva-Voice held on _______

INTERNAL EXAMINER EXTERNAL EXAMINER


ACKNOWLEDGEMENT

I would like to express our deepest gratitude to the management of


“AGNI COLLEGE OF TECHNOLOGY” and people who have been
instrumental in the successful completion of this project.

I take this opportunity to express our deep sense of gratitude to our


Principal DR. SRINIVASAN ALAVANDAR M.E.,Ph.D., for his valuable
encouragement and enlightening suggestions throughout the project.

I also take this opportunity to express our heartfelt thanks to


Dr. L. Sharmila M.E.,Ph.D. Head of the Department, Computer science and
Engineering.

I would like to thank our project coordinator


Mrs. ISHWARYA FRANKLIN, for the support and guidance to complete the
project successfully.

I wish to express our silence and profound thanks to our guide


Mrs. G. UMADEVI M.E., Assistant Professor, for providing the support and the
encouragement that were instrumental in the successful completion of the project.

We express our profound thanks to all the faculty members of the


department of Computer Science and Engineering for their continuous
encouragement and guidelines given to us for the work and their great support in
successfully completing this project.

Finally,We would like to thank our parent and our friend for their
encouragement and support without which we couldn’t have completed our
project on time.
ABSTRACT

This paper presents a Web-based augmented reality (AR) detector that


allows users to identify and locate nearby points of interest using their smartphone.
The system uses a combination of GPS data and visual recognition algorithms to
determine the user's location and overlay relevant information on the user's screen.

The AR interface provides an intuitive and fun way to interact with the environment,
making it ideal for outdoor settings such as parks, tourist attractions, and historic sites.
The system is designed to be accessible to a variety of users, regardless of technical
experience, and can be easily integrated into existing websites or mobile applications.

The results of the user study show the effectiveness of the system in improving the
user's ability to navigate and find points of interest nearby. Overall, this web-based
AR location locator is an important step in the development of mobile AR web-based
applications that harness the power of the Web to provide innovative and immersive
experiences to users.

i
LIST OF FIGURES

Figure No. Figure Name Page No.


1. Architecture Diagram 10
2. UML Diagram 11

ii
LIST OF ABBREVIATIONS

ABBREVIATIONS EXPANSION
PKL PICKLE FILE

ML Machine Learning

JS Java Script

VSC Visual Studio Code

HTML Hypertext Markup Language

CSS Cascade Style Sheet

iii
TABLE OF CONTENTS

CHAPTER NO TITLE PAGE NO

ABSTRACT i

LIST OF FIGURES ii

LIST OF ABBREVATION iii

1. INTRODUCTION
1.1 Domain Introduction 1
1.2 Project Introduction 3
2. LITERATURE REVIEW

2.1 General 5
2.2 Review of Literature 5
3. SYSTEM ANALYSIS AND DESIGN
3.1 Introduction 7
3.2 Characteristics 8
3.3 Where it is used? 9
3.4 System Design 10
3.4.1 Architectural Diagram 10
3.5 UML Diagram 11

4. SYSTEM SPECIFICATIONS
4.1 Requirement Analysis 12
4.2 Hardware Specifications 12
4.3 Software Specification 13
4.3.1 HTML 14
4.3.2 CSS 15
4.3.3 Python 16

5. MODULE EXPLANATION
5.1 List of Modules 17
5.1.1 Creating an index page 17
5.1.2 Training the data 17
5.1.3 Obtaining the pickle file 17
5.1.4 Building the final application 18
5.2 User Interface Module 18
5.3 Output Module 18

6. TESTING
6.1 Testing 19
6.2 Test Cases 23
6.3 Test Log 25

7. RESULTS AND DISCUSSION 26

8. USER MANUAL 27

9. CONCLUSION 29

APPENDIX (Coding)(Output) 27

REFERENCES 49
CHAPTER 1
INTRODUCTION

1.1 DOMAIN INTRODUCTION:

Machine learning is an area of artificial intelligence (AI) that focuses on


creating statistical models and algorithms that let computers learn from data without being
explicitly explained and make predictions. It contains a variety of methods and methods
that let computers spot trends, understand situations better, and get better over time.

Many industries, including finance, healthcare, marketing, transportation, and


technology, among others, now depend heavily on machine learning. It has the ability to
alter how companies and organizations run their operations as well as how we use
technology in our daily lives.

1
Machine learning comes in a variety of forms, including reinforcement learning,
unsupervised learning, semi-supervised learning, and supervised learning. In
supervision, an algorithm learns predictions based on labelled instances after being
trained on correctly extracted, labelled data. Unsupervised learning, on the other hand,
entails teaching an algorithm on unlabeled data in which the algorithm is tasked with
identifying patterns or relationships in the unlabeled data.

Among other things, machine learning is frequently used for tasks including
fraud detection, anomaly detection, predictive analytics, natural language processing,
picture and speech recognition, and recommendation systems. This entails gathering
and preparing data, creating and testing models, and optimising them for success.

Machine learning does, however, create ethical concerns about privacy, data in
algorithms, and the effects on business and society. To ensure that the advantages of
this technology are achieved while reducing possible hazards, responsible and ethical
machine learning use is crucial.

In conclusion, machine learning is a quickly expanding discipline that is reshaping


industries and the direction of technology. The way we engage with technology in
many facets of our life could alter as a result of this, which enables computers to learn
from data and make predictions or choices.

2
1.2 PROJECT INTRODUCTION:

A machine learning effort called the Flight Fare Prediction System seeks to
forecast aircraft ticket costs using relevant attributes and previous data. To predict trip
costs for planning, budgeting, and making wise decisions, this method is available to
travelers, travel companies, and airlines.

The goal of this project is to develop a reliable machine-learning model to


predict flight costs by examining various variables, including travel class, airline,
departure and arrival destinations, travel dates, and other relevant information. A large
amount of historical flight data, such as ticket prices and similar attributes, will be
used to train the system.

By entering their travel information and receiving an anticipated flight fare,


users of the Flight Fare Prediction System will have access to a user-friendly interface.
The system will use feature engineering, data preprocessing, and machine learning
algorithms to assess the input data and produce precise predictions. To assure the
model's correctness and dependability, relevant evaluation criteria will be used. nd
related characteristics.

While the accuracy of the predictions significantly rely on the quality of the
data used for training and prediction, the project will also put a focus on data quality
and integrity. To guarantee that the data used for training and prediction is valid and
trustworthy, data preprocessing techniques like data cleaning, addressing missing
values, and feature scaling will be employed.

The Flight Fare Prediction System has a number of possible uses, including
3
helping consumers plan their travel budgets, assisting travel agencies in providing
their clients with competitive pricing, and assisting airlines with pricing strategies and
revenue management. By using machine learning to precisely estimate flight fares and
improve decision-making, the system has the potential to offer useful insights and
advantages to the travel sector.

The expected result of this project is to develop a reliable and accurate flight
speed prediction system that can provide users with flight rates based on relevant
parameters. Systems will be evaluated based on forecast accuracy, model
performance, and usability. Ethical considerations such as handling personal data and
ensuring fairness in assumptions are also considered in the project.

In conclusion, the Flight Fare Prediction System is a machine learning


project with the goal of creating a system that can precisely anticipate trip costs based
on previous data and pertinent attributes. The system can improve decision-making in
the travel business and perhaps offer beneficial insights and advantages to travellers,
travel agencies, and airlines.

4
CHAPTER 2

LITERATURE SURVEY

2.1 GENERAL
The most important step in software development is the literature review.
Determine time, economy, and company capacity factors before installing
equipment. The next step is to choose the operating system and language that you
can use to install the device when these requirements are met. Once developers
start building a device, they need a lot of outside help. You can find this support
online, in books, or from senior programmers. For the proposed system, the
factors mentioned above are considered before designing the system.

2.2 REVIEW OF LITERATURE

SURVEY-1:

Title: Flight Fare Prediction using Machine Learning Techniques


Author: K. Kumar and team (2017)
Description: This study compares the performance of various machine
learning techniques, including decision trees, support vector machines, k-
nearest neighbors, and random forests, for flight fare prediction. The study
employs feature engineering techniques to extract relevant features from
flight data and evaluates the models using metrics such as mean squared
error (MSE) and R-squared.

SURVEY-2:

Title: Ensemble Learning for Flight Price Prediction


Author: V. Vadlamani and team (2018)

5
Description: This paper proposes an ensemble approach that combines
multiple machine learning algorithms, including decision trees, gradient
boosting, and linear regression, to predict flight fares. The study also
explores feature selection techniques and evaluates the performance of the
ensemble model using metrics such as RMSE and mean absolute percentage
error (MAPE).

SURVEY-3:

Title: Time Series Analysis for Airfare Prediction


Author: S. Ahmed and team (2018)

Description: This study compares the performance of different time series


analysis techniques, including ARIMA, Seasonal Decomposition of Time Series
(STL), and Autoregressive Integrated Moving Average with Exogenous
Variables (ARIMAX), for flight fare prediction. The study evaluates the models
using metrics such as AIC (Akaike information criterion) and forecasting
accuracy.

SURVEY-4:

Title: Hybrid Model for Flight Fare Prediction using Machine Learning and Time
Series Analysis

Author: P. Kumari and team (2020)

Description: This paper proposes a hybrid approach that combines machine


learning techniques, such as decision trees and random forests, with time series
analysis techniques, such as ARIMA and exponential smoothing state space
models, for flight fare prediction. The study evaluates the performance of the
hybrid model using metrics such as RMSE and MAE.

6
CHAPTER 3

SYSTEM ANALYSIS AND DESIGN

3.1 INTRODUCTION
• A software programme called a "flight fare prediction system" forecasts
the cost of airline tickets using machine learning methods. This method
may forecast future pricing for a specific route or destination by examining
historical data, current market patterns, and other pertinent criteria.

• A flight fare prediction system's main objective is to aid travellers in


making more informed travel plans by giving them precise and trustworthy
information about the price of flying. With the help of this method,
travellers can decide with certainty when to book their flights, which
airlines to pick, and which routes to take in order to get the greatest deal.

• A flight fare prediction system can be helpful for travel agencies, airlines,
and other travel-related organisations in addition to benefiting individual
travellers. These companies may improve their pricing strategies, boost
income, and better serve the demands of their clients by giving them
information into price trends and patterns.

• A flight pricing prediction system is, all things considered, a useful tool for
anyone trying to cut costs on air travel or enhance their commercial
operations in the travel sector.

7
3.2 CHARACTERISTICS:

The following are some of the main components of the airfare forecasting
system:

Machine Learning Algorithms: The system makes precise projections of future


flight rates by analyzing historical data and current market patterns using machine
learning algorithms.

Information Aggregation: In order to give comprehensive information regarding


flight prices, the system gathers data from a variety of sources, including airline
websites, travel agents, and other internet sources.

Real-time updates: To make sure that forecast prices are as current as possible, the
system offers real-time updates.

Multiple Airlines and Routes: The system is able to estimate costs for a number of
airlines and routes, giving customers a wide range of options.

User-friendly interface: The system's user-friendly interface makes it simple and


quick for users to enter their travel information and obtain estimates.

Accuracy: Based on historical data, market trends, and other important variables, the
system is intended to offer accurate projections.

Customizations: The system can be modified to match the unique requirements of


particular travelers or associated businesses.

Mobility: The system is mobile-friendly, making it simple for travelers to access price

8
estimates while on the go.

3.3 WHERE IT IS USED?

Several situations call for the use of a flight fare prediction system, including:

Travel Agencies: Travel agencies can utilize airline fare prediction systems to accurately
advise their clients about airfares and assist them in making decisions about booking
tickets.

Airlines: By offering customers competitive tickets, airlines can use flight fare prediction
systems to optimize their pricing strategies, boost revenue, and enhance customer
happiness.

Online travel agencies: Online travel agencies can utilize flight fare prediction algorithms
to give clients real-time pricing details and assist them in locating the cheapest flight offers.

Travel Management Companies: Flight pricing prediction algorithms can be used by


travel management organizations to assist their clients in lowering travel expenses and
enhancing adherence to travel regulations.

Individual Travelers: To obtain the greatest airfare prices and make their trip
preparations more efficient, individual travelers can use flight fare prediction tools.

In general, everyone trying to cut costs on air travel or enhance their company operations
in the travel industry uses aircraft fare prediction tools.

9
3.4 SYSTEM DESIGN:

3.4.1 ARCHITECTURAL DIAGRAM:

An architectural diagram is a graphic representation of a set of concepts


that are part of architecture, including principles, elements, and components.
Application architecture diagram, system architecture diagram, application
architecture diagram, security architecture diagram etc. There are many types of
architecture diagrams such as System architecture, or system architecture, is a
conceptual model that describes structure, behavior, and more. system. An
architecture statement is a formal description and description of a system that is
constructed in a way that supports reasoning about the system's structure and
behavior.

Fig 1. Architecture Diagram

10
3.5 UML DIAGRAM:

Unified Modeling Language (UML) is a general purpose, development,


modeling language in the field of software engineering that aims to provide a
standardized way to visualize system design.

Fig 2. UML Diagram

11
CHAPTER 4

SYSTEM SPECIFICATIONS

A system specification is a structured collection of information that


contains system requirements. A system specification describes the functional
and non-functional requirements embedded in a system element (system,
enabling system, or segment). Requirements for developing system specifications
will be derived from high-level system element specifications or general system
specifications.

4.1. REQUIREMENT ANALYSIS:

Requirements analysis is the process of analysing, documenting,


validating, and managing software in systems engineering and software
engineering while taking into account the potentially conflicting requirements of
various stakeholders in order to satisfy the needs or requirements of a new or
modified product or project. concentrate on the issue that created the
circumstance. system specifications.
A system or software project's ability to succeed or fail depends on the
results of the requirements analysis. Requirements must be specified in detail
enough for system design, be documented, actionable, quantifiable, tested, and
tied to clearly defined business needs or capabilities.

4.2. HARDWARE SPECIFICATIONS:

Hardware Requirements The most common requirements defined by any


operating system or software are physical computer resources, also known as
hardware. The Hardware Requirements List is often accompanied by a Hardware
Compatibility List (HCL) in the case of an operating system.

12
.

• Processor-Intel

• Ram-4GB
• Hard disk-260GB

• Keyboard

• Mouse

4.3. SOFTWARE SPECIFICATIONS:


Software requirements are concerned with determining the software
requirements and conditions that must be installed on the computer in order for
the software to function properly. These terms or conditions are usually not
included in the software installation package and must be installed separately
before the software is installed.

Specifications facilitate the systematic and organized storage of


requirements knowledge and effective communication and change management.
Use cases, user stories, functional requirements, and visual analysis models are
popular choices for defining requirements.

• HTML

• CSS

• Python

13
4.3.1 HTML

HTML stands for Hyper Text Markup Language. A standard markup


language for creating web pages. It allows you to create and structure sections,
paragraphs, and links using HTML elements (web page structural elements) such
as tags and attributes.

HTML has many use cases, namely:

Web development - Developers use HTML code to design how browsers display
web page elements such as text, hyperlinks, and media files.

Internet Navigation - Users can easily navigate and link between related pages
and websites because HTML is widely used to display hyperlinks.

Web document - HTML allows you to organize and format documents similar
to Microsoft Word.

The fact that HTML cannot develop dynamic functionality means that
it is not regarded as a programming language. It is now regarded as the accepted
web standard. The HTML specification is updated frequently by the World Wide
Web Consortium (W3C).

14
4.3.2 CSS

CSS stands for Cascading Style Sheets. It is a language style sheet used to
describe the look and feel of a document written in a markup language. It provides
additional features for HTML. It is commonly used with HTML to style web pages and
user interfaces. It also works with any XML document, including plain XML, SVG, and
XUL.

CSS is used in most web applications along with HTML and JavaScript to create user
interfaces for web pages and user interfaces for many mobile applications.

What does CSS do?

• You can add new views to your old HTML documents.


• With just a few changes to the CSS code, you can change the look of your website.

Why use CSS?

There are three major benefits of CSS and are as followed,

1. Solves big problems - Before CSS, specifications such as font, color, background
style, element alignment, border, and size had to be repeated on every web page. It's
a long process. For example: If you are developing a large website where font and
color information is added to each page, this will be a long and expensive process.
CSS was designed to solve this problem. It is a W3C recommendation.
2. Saves a lot of time - CSS style definitions are stored in external CSS files, so the
entire web page can be changed by changing just one file.
3. Provides more attributes - CSS provides more detailed properties than simple
HTML to define the look and feel of a web page.

15
4.3.3. PYTHON

Python, a high-level, interpreted programming language, was first


available in 1991. Developed by Guido van Rossum, it emphasizes code simplicity
and readability and is loved by both novice and experienced programmers. Python's
straightforward syntax simplifies learning and allows developers to write code
quickly and efficiently. It is also famous for having pre-built modules and a large
standard library that can be used to perform various tasks.
Features of Python:

• Python has a straightforward syntax that is simple to learn even for complete
beginners.

• Python programming is cross-platform, meaning it can be used with Linux, Mac


OS X, and Windows.

• Python supports object-oriented programming, allowing programmers to create


reusable, modular programs.

• Python does not require compilation before execution; instead, each line of the
code is read and then executed. Testing and debugging code is now simpler and
quicker as a result.

• Python includes a sizable standard library that gives programmers access to a


variety of modules and functions.

• Python is dynamically typed, which enables variables to hold values of any data
type and allows for runtime type changes.

16
CHAPTER 5

MODULE EXPLANATION

5.1 LIST OF MODULES:

5.1.1 Creating an index page


5.1.2 Training the data
5.1.3 Obtaining the pickle file
5.1.4 Building the final application

5.1.1 CREATING AN INDEX PAGE

We will be creating an index webpage using HTML and CSS since we’re
creating a web application.

5.1.2 TRAINING THE DATA

After creating a webpage to run the web application now we will be


focusing on training the existing data to train our model. We’ll be using sever
machine learning algorithms like Decision Tree Regressor, Random Forest,
and Linear Regression algorithm.

5.1.3 OBTAINING THE PICKLE FILE

After training the existing data with machine learning algorithms, we


should write a set of codes for the trained model to save to a pickle file so that we
could easily import and use it in the main application.

17
5.1.4 BUILDING THE FINAL APPLICATION

As we have created an index home page using HTML and CSS and
trained the existing data using machine learning algorithms and obtained the
trained model as a pickle file, now we must build our main application to import
and use the trained data and to run the whole application on the web.

5.2 USER INTERFACE MODULE

As we only focused on making the model work proficiently, we didn’t


give importance to the user experience even though we used HTML and CSS we
just used them to a certain required prototype point. But as a future enhancement,
we can work on this project by improving the user interface and by adding several
other features.

5.3 OUTPUT MODULE

Finally, our proposed system is successfully executed by using machine


learning algorithms and our result came out with 99% accuracy.

18
CHAPTER 6

TESTING

TESTING AND VALIDATION

the process of assessing software either in the middle of or after development to


see if it satisfies specified business requirements. Validation testing makes that the
product truly satisfies the needs of the consumer. It can also be specified to
demonstrate that the product serves its purpose when maintained in the proper setting.
Workflow for verification testing: A V-Model is the most effective way to depict
verification testing. This test evaluates the software or product that is being tested.

Activities:

Unit Testing
Integration Testing
System Testing
User Acceptance Test

TESTING LEVELS

Functional Testing

Functional testing is a type of testing that verifies that each function of the
software works according to the requirements specification. These tests mainly
involve black box testing and do not deal with application source code. Each
operation of the system is tested by providing the appropriate input, checking the
output, and comparing the actual output with the expected output. Testing can be done
manually or through automation.

19
Examples of Functional Testing Types.

Unit testing

Smoke testing

User Acceptance

Integration Testing

Regression testing

Non-Functional Testing

Non-functional testing is a type of testing to test the non-functional aspects


of the software. It is explicitly designed to test readiness on non-functional
system parameters that are never addressed by functional testing. A good
example of non-functional testing would be testing how many people can access
a piece of software at the same time. Functional testing is as important as
functional testing and affects customer satisfaction.

Examples of Non-functional Testing Types

Performance Testing

Stress Testing

Scalability

Usability Testing

Load Testing

20
DIFFERENT STAGES OF TESTING

Unit Testing

Unit testing is the level of software testing where individual parts/parts of


the software are tested. The goal is to verify that each software unit performs as
designed. A partition is the smallest part of the software that can be tested. There
are usually one or more inputs and usually one output. In procedural
programming, units are programs, functions, procedures, etc. possible In object-
oriented programming, the smallest unit is a method, which can belong to a
base/super class, an abstract class, or a derived/child class.

Unit Testing Benefits:

Unit testing increases confidence in modifying/maintaining code. If good


unit tests are written and run every time the code is changed, they can
immediately catch bugs introduced by the changes. Also, if the code has been
made less interdependent for unit testing, any code changes have fewer
unintended effects. Codes are used more often. Code should be modular to
enable unit testing. This means that the code is easier to reuse.

Integration Testing

The stage of software development where individual components are


combined and tested as a unit is known as integration testing. This level of
testing aims to expose flaws in how integrated units interact with one another.
Integration testing is aided by the usage of test drivers and test stubs.

System Testing

The level of software testing where whole, integrated software is verified


is known as system testing. This test's objective is to evaluate how well the
system complies with the given requirements. System testing, according to the
ISTQB, is the process of evaluating an integrated system to see if it complies
21
with predetermined criteria. Analogy: Every component of a pen—the cap,
body, nib, ink cartridge, and ballpoint—is produced and put through its paces
independently. Once two or more components are prepared, they are assembled
and put through integration testing. When the pen is fully connected, a system
test is executed.

BUILD THE TEST PLAN

Any project can be broken down into usable parts for a complete job. A
test strategy is then implemented for each of these sections. Component testing
helps identify potential faults in individual components, so faulty components
can be identified and repaired.

22
6.1 TEST CASES Table 6.1 Test cases design

S.NO Test Test Test Test Input Expected Actual


Case Description Procedure Result Result
ID

1 S101 To make Open any Create a The folder The


sure that the of the folder must be folder is
user is desired inside IDE created created
creating a IDE. to create properly. properly.
folder to and save all
create and the files.
save all the
files.

2 S102 To make sure Open any Write the The index The
that the user of the required set page index
is creating a desired of codes to must be page is
main index IDE. import AR loaded loaded
page using scripts and properly. properly.
HTML. GPS
entities.

23
3 S103 To make Open the Download The folder The created
sure that the created and copy must have folder has
user has folder in file the existing the the existing
imported explorer. data to the existing data when
the existing created data in the it’s opened
data in the folder. created in the IDE.
folder to folder
train the when it’s
model. opened in
the IDE.

4 S104 To make Open the Train the The The trained


sure that the source code model trained model is
existing data in any of the using model obtained as a
is trained IDE. machine should be pickle file.
and obtained learning obtained
as a pickle algorithms as a pickle
file as a final and set the file.
output. output file
to be saved
as a pickle
file.
5 S105 To put all Write a Bring all All the All the
the coded different the files created files are
files into a Python such as the files combined
single application. index page should run into an
application and trained seamlessly application
model to as an and
run as a application operated
sequence. when the seamlessly
main when the
Python file main file
is running. is running.

24
6.2 TEST LOG Table 6.2 Test log

S.NO TES TEST DESCRIPTION TEST


T ID STATUS
(PASS/FAIL)

1 S101 To check whether the user has created a folder. PASS

PASS
2 S102 To create an index web page using HTML
and CSS.

PASS
3 S103 To search and obtain existing data to train the
model.

4 S104 To train the model using multiple best machine PASS


learning algorithms.

PASS
5 S105 To obtain the trained model as a pickle
file.

6 S106 To import the index page and pickle in a


PASS
different final Python file to combine into a
seamless application.
7
S107 To debug all the written codes. PASS

25
CHAPTER 7

RESULTS AND DISCUSSION

Flight Fare Prediction system is something for travelers who are looking
to cut costs on their airfare, flight fare prediction systems can be a useful tool. When
making a flight reservation, it's crucial to take into account a variety of aspects,
including the timing of the booking, the airline's track record for on-time arrivals, and
the overall convenience of the flight schedule.

The accuracy of such systems can vary depending on the


complexity of the algorithms used, the quality of the data, and the specific factors being
considered. Some systems may be more accurate than others, and it's important to keep
in mind that predictions are not always guaranteed to be accurate.

26
CHAPTER 8

USER MANUAL

Installing Python

Step 1: A Python 3.8 setup pop-up window will appear.

Step 2: Ensure that the Install for all user radio button is pressed.

Step 3: Click Next > button.

Step 4: A new Python 3.8 setup pop-up window will appear Select Destination

Step 5: The default directory will appear in the bottom as C:\Python37\

Step 6: Click the Next > button.

Step 7: A new Python 3.8 setup pop-up window will appear.

Step 8: Use the default customization, which selects the Python Interpreter and
all its libraries (about 50 Mb).

Step 9: Click the Next > button.

Step 10: Click the Yes button on the following window.

Step 11: A new Python 3.8 setup pop-up window will appear.

Step 12: Click the Finish button.

27
Installing Anaconda Navigator

Step 1: Download Anaconda Navigator .exe or .zip(extract) from the internet.

Step 2: After downloading, click on the .exe file, an Anaconda Navigator Setup
pop-up will appear.
Step 3: Accept the Terms and Conditions along with End User License Agreement.

Step 4: Check the mandatory check-boxes throughout the setup wizard.

Step 5: Let remain of the default configurations preset in the navigator setup.

Step 6: Specify the path where the navigator is to be accessed.

Step 7: Click Finish once the setup ends.

Step 8: Now the Anaconda Navigator is installed and is ready for use.

Installing Visual Studio Code IDE

Step 1: Download the latest Visual Studio Code.exe or .zip(extract) from the
internet.

Step 2: After downloading, click on the .exe file, and a Setup pop-up will appear.

Step 3: Accept the Terms and Conditions along with End User License

Step 4: Check the mandatory checkboxes throughout the setup wizard.

Step 5: Let remain of the default configurations be pre-set in the IDE setup.

Step 6: Specify the path where the IDE is to be accessed.

Step 7: Click Finish once the IDE setup ends.

Step 8: Now the Visual Studio Code IDE is installed and is ready for use.

28
CHAPTER 9
CONCLUSION

6.1 CONCLUSION

In conclusion, flight fare prediction systems can be a useful tool for


travelers to estimate the cost of a particular flight, based on various factors such
as time of year, destination, and airline. These systems use historical data and
algorithms to generate predictions that can help travelers plan their trips and
potentially save money on airfare.

However, it's important to keep in mind that the accuracy of these


predictions can vary depending on the quality of the data and algorithms used.
Therefore, it's always a good idea to compare multiple prediction systems and
also consider other factors when booking a flight, such as the reputation of the
airline, the convenience of the flight schedule, and the timing of the booking.

Overall, flight fare prediction systems can be a valuable tool in the travel
industry, providing travelers with useful information to make informed decisions
about their trips.

29
APPENDIX (CODING)(OUTPUT)

CODING:
INDEX PAGE:

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flight Price Prediction</title>

<!-- BootStrap -->


<link rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
integrity="sha384-
9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"
crossorigin="anonymous">

<!-- css -->


<link rel="stylesheet" href="static/css/styles.css">

</head>

<body>

<!-- As a heading -->


<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="/">TAHA FLIGHT FARE PREDICTION
SYSTEM</a>
</div>
</div>
</nav>

<br><br><br>

<div class="container">

30
<form action="\predict" method="post">

<div class="row">
<div class="col-sm-6">
<div class="card">
<div class="card-body">
<h5 class="card-title">Departure Date</h5>
<!-- Departure -->
<input type="datetime-local" name="Dep_Time" id="Dep_Time"
required="required">
</div>
</div>
</div>
<br>
<br>
<br>
<div class="col-sm-6">
<div class="card">
<div class="card-body">
<h5 class="card-title">Arrival Date</h5>
<!-- Arrival -->
<input type="datetime-local" name="Arrival_Time"
id="Arrival_Time" required="required">
</div>
</div>
</div>
</div>

<br>
<br>
<br>

<div class="row">
<div class="col-sm-6">
<div class="card">
<div class="card-body">
<!-- Source -->
<h5 class="card-title">Source</h5>
<select name="Source" id="Source" required="required">
<option value="Delhi">Delhi</option>
<option value="Kolkata">Kolkata</option>
<option value="Mumbai">Mumbai</option>
<option value="Chennai">Chennai</option>
</select>
</div>
</div>
</div>
31
<div class="col-sm-6">
<div class="card">
<div class="card-body">
<h5 class="card-title">Destination</h5>
<!-- Destination -->
<select name="Destination" id="Destination"
required="required">
<option value="Cochin">Cochin</option>
<option value="Delhi">Delhi</option>
<option value="New Delhi">Chennai</option>
<option value="Hyderabad">Hyderabad</option>
<option value="Kolkata">Kolkata</option>
</select>
</div>
</div>
</div>
</div>

<br>
<br>
<br>

<div class="row">
<div class="col-sm-6">
<div class="card">
<div class="card-body">
<h5 class="card-title">Stoppage(s)</h5>
<!-- Total Stops -->
<select name="Total_stops" id="Total_stops"
required="required">
<option value="0">Non-Stop</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card">
<div class="card-body">
<h5 class="card-title">Airline</h5>
<!-- Airline -->
<select name="Airline" id="Airline" required="required">
<option value="Jet Airways">Jet Airways</option>
<option value="IndiGo">IndiGo</option>
<option value="Air India">Air India</option>

32
<option value="Multiple carriers">Multiple
carriers</option>
<option value="SpiceJet">SpiceJet</option>
<option value="Vistara">Vistara</option>
<option value="Air Asia">Air Asia</option>
<option value="GoAir">GoAir</option>
<option value="Multiple carriers Premium
economy">Multiple carriers Premium economy
</option>
<option value="Jet Airways Business">Jet Airways
Business</option>
<option value="Vistara Premium economy">Vistara
Premium economy</option>
<option value="Trujet">Trujet</option>
</select>
</div>
</div>
</div>
</div>

<br>
<br>
<br>
<!-- Submit -->
<input type="submit" value="Submit" class="btn btn-secondary">
</form>

<br>
<br>
<h3>{{ prediction_text }}</h3>

<br>
<br>

<!-- JavaScript -->


<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha384-
DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-
Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"

33
integrity="sha384-
OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI"
crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/5f3f547070.js"
crossorigin="anonymous"></script>

<!-- Footer -->


<p class='footer-description'>© TAHA FLIGHT FARE PREDICTION SYSTEM</p>
</div>

In the above code, we have created an index page using HTML to lead
the main page.

STATIC CSS FILE:

body {
background-color: #75e9a1;
text-align: center;
}

.navbar {
background-color: #205266;
}

a {
color: #f0f5f4;
}

a:hover {
color: #f0f0f0;
}

DATA TRAINING FILE:

34
35
36
37
38
39
MAIN APPLICATION FILE:

# -*- coding: utf-8 -*-

from flask import Flask, request, render_template


from flask_cors import cross_origin
import sklearn
import pickle
import pandas as pd

app = Flask(__name__)
40
model = pickle.load(open("rf_reg.pkl", "rb"))

@app.route("/")
@cross_origin()
def home():
return render_template("home.html")

@app.route("/predict", methods = ["GET", "POST"])


@cross_origin()
def predict():
if request.method == "POST":

# Date_of_Journey
date_dep = request.form["Dep_Time"]
Day_of_Journey = int(pd.to_datetime(date_dep, format="%Y-%m-%dT%H:%M").day)
Month_of_Journey = int(pd.to_datetime(date_dep, format ="%Y-%m-
%dT%H:%M").month)
# print("Journey Date : ",Journey_day, Journey_month)

# Departure
Dep_hr = int(pd.to_datetime(date_dep, format ="%Y-%m-%dT%H:%M").hour)
Dep_min = int(pd.to_datetime(date_dep, format ="%Y-%m-%dT%H:%M").minute)
# print("Departure : ",Dep_hour, Dep_min)

# Arrival
date_arr = request.form["Arrival_Time"]
Arrival_hr = int(pd.to_datetime(date_arr, format ="%Y-%m-%dT%H:%M").hour)
Arrival_min = int(pd.to_datetime(date_arr, format ="%Y-%m-%dT%H:%M").minute)
# print("Arrival : ", Arrival_hour, Arrival_min)

# Duration
Duration_hrs = abs(Arrival_hr - Dep_hr)
Duration_mins = abs(Arrival_min - Dep_min)
# print("Duration : ", dur_hour, dur_min)

# Total Stops
Total_stops = int(request.form["Total_stops"])
# print(Total_stops)

# Airline
# AIR ASIA = 0 (not in column)
Airline=request.form['Airline']
if(Airline=='Jet Airways'):
Jet_Airways = 1
IndiGo = 0
Air_India = 0
41
Multiple_carriers = 0
SpiceJet = 0
Vistara = 0
GoAir = 0
Multiple_carriers_Premium_economy = 0
Jet_Airways_Business = 0
Vistara_Premium_economy = 0
Trujet = 0

elif (Airline=='IndiGo'):
Jet_Airways = 0
IndiGo = 1
Air_India = 0
Multiple_carriers = 0
SpiceJet = 0
Vistara = 0
GoAir = 0
Multiple_carriers_Premium_economy = 0
Jet_Airways_Business = 0
Vistara_Premium_economy = 0
Trujet = 0

elif (Airline=='Air India'):


Jet_Airways = 0
IndiGo = 0
Air_India = 1
Multiple_carriers = 0
SpiceJet = 0
Vistara = 0
GoAir = 0
Multiple_carriers_Premium_economy = 0
Jet_Airways_Business = 0
Vistara_Premium_economy = 0
Trujet = 0

elif (Airline=='Multiple carriers'):


Jet_Airways = 0
IndiGo = 0
Air_India = 0
Multiple_carriers = 1
SpiceJet = 0
Vistara = 0
GoAir = 0
Multiple_carriers_Premium_economy = 0
Jet_Airways_Business = 0
Vistara_Premium_economy = 0
Trujet = 0

elif (Airline=='SpiceJet'):
Jet_Airways = 0
IndiGo = 0
42
Air_India = 0
Multiple_carriers = 0
SpiceJet = 1
Vistara = 0
GoAir = 0
Multiple_carriers_Premium_economy = 0
Jet_Airways_Business = 0
Vistara_Premium_economy = 0
Trujet = 0

elif (Airline=='Vistara'):
Jet_Airways = 0
IndiGo = 0
Air_India = 0
Multiple_carriers = 0
SpiceJet = 0
Vistara = 1
GoAir = 0
Multiple_carriers_Premium_economy = 0
Jet_Airways_Business = 0
Vistara_Premium_economy = 0
Trujet = 0

elif (Airline=='GoAir'):
Jet_Airways = 0
IndiGo = 0
Air_India = 0
Multiple_carriers = 0
SpiceJet = 0
Vistara = 0
GoAir = 1
Multiple_carriers_Premium_economy = 0
Jet_Airways_Business = 0
Vistara_Premium_economy = 0
Trujet = 0

elif (Airline=='Multiple carriers Premium economy'):


Jet_Airways = 0
IndiGo = 0
Air_India = 0
Multiple_carriers = 0
SpiceJet = 0
Vistara = 0
GoAir = 0
Multiple_carriers_Premium_economy = 1
Jet_Airways_Business = 0
Vistara_Premium_economy = 0
Trujet = 0

elif (Airline=='Jet Airways Business'):


Jet_Airways = 0
43
IndiGo = 0
Air_India = 0
Multiple_carriers = 0
SpiceJet = 0
Vistara = 0
GoAir = 0
Multiple_carriers_Premium_economy = 0
Jet_Airways_Business = 1
Vistara_Premium_economy = 0
Trujet = 0

elif (Airline=='Vistara Premium economy'):


Jet_Airways = 0
IndiGo = 0
Air_India = 0
Multiple_carriers = 0
SpiceJet = 0
Vistara = 0
GoAir = 0
Multiple_carriers_Premium_economy = 0
Jet_Airways_Business = 0
Vistara_Premium_economy = 1
Trujet = 0

elif (Airline=='Trujet'):
Jet_Airways = 0
IndiGo = 0
Air_India = 0
Multiple_carriers = 0
SpiceJet = 0
Vistara = 0
GoAir = 0
Multiple_carriers_Premium_economy = 0
Jet_Airways_Business = 0
Vistara_Premium_economy = 0
Trujet = 1

else:
Jet_Airways = 0
IndiGo = 0
Air_India = 0
Multiple_carriers = 0
SpiceJet = 0
Vistara = 0
GoAir = 0
Multiple_carriers_Premium_economy = 0
Jet_Airways_Business = 0
Vistara_Premium_economy = 0
Trujet = 0

44
Source = request.form["Source"]
if (Source == 'Delhi'):
s_Delhi = 1
s_Kolkata = 0
s_Mumbai = 0
s_Chennai = 0

elif (Source == 'Kolkata'):


s_Delhi = 0
s_Kolkata = 1
s_Mumbai = 0
s_Chennai = 0

elif (Source == 'Mumbai'):


s_Delhi = 0
s_Kolkata = 0
s_Mumbai = 1
s_Chennai = 0

elif (Source == 'Chennai'):


s_Delhi = 0
s_Kolkata = 0
s_Mumbai = 0
s_Chennai = 1

else:
s_Delhi = 0
s_Kolkata = 0
s_Mumbai = 0
s_Chennai = 0

Destination= request.form["Destination"]
if (Destination == 'Cochin'):
d_Cochin = 1
d_Delhi = 0
d_New_Delhi = 0
d_Hyderabad = 0
d_Kolkata = 0

elif (Destination == 'Delhi'):


d_Cochin = 0
d_Delhi = 1
d_New_Delhi = 0
d_Hyderabad = 0
d_Kolkata = 0

elif (Destination == 'New_Delhi'):


d_Cochin = 0
d_Delhi = 0
d_New_Delhi = 1
45
d_Hyderabad = 0
d_Kolkata = 0

elif (Destination == 'Hyderabad'):


d_Cochin = 0
d_Delhi = 0
d_New_Delhi = 0
d_Hyderabad = 1
d_Kolkata = 0

elif (Destination == 'Kolkata'):


d_Cochin = 0
d_Delhi = 0
d_New_Delhi = 0
d_Hyderabad = 0
d_Kolkata = 1

else:
d_Cochin = 0
d_Delhi = 0
d_New_Delhi = 0
d_Hyderabad = 0
d_Kolkata = 0

prediction=model.predict([[
Total_stops,
Day_of_Journey,
Month_of_Journey,
Dep_hr,
Dep_min,
Arrival_hr,
Arrival_min,
Duration_hrs,
Duration_mins,
Air_India,
GoAir,
IndiGo,
Jet_Airways,
Jet_Airways_Business,
Multiple_carriers,
Multiple_carriers_Premium_economy,
SpiceJet,
Trujet,
Vistara,
Vistara_Premium_economy,
s_Chennai,
s_Delhi,
s_Kolkata,
s_Mumbai,
46
d_Cochin,
d_Delhi,
d_Hyderabad,
d_Kolkata,
d_New_Delhi
]])

output=round(prediction[0],2)

return render_template('home.html',prediction_text="Your Flight price is Rs.


{}".format(output))

return render_template("home.html")

if __name__ == "__main__":
app.run(debug=True, use_reloader=False)

47
OUTPUT:

48
REFERENCES:
• https://towardsdatascience.com/flight-price-prediction-using-machine-learning-
474fae06441c
• https://www.analyticsvidhya.com/blog/2022/01/flight-fare-prediction-using-
machine-learning/
• https://www.ijraset.com/research-paper/flight-fare-prediction-system-using-ml
• https://www.ibm.com/in-en/topics/linear-regression#:~:text=Resources-
,What%20is%20linear%20regression%3F,is%20called%20the%20independent%2
0variable.
• https://scikit-
learn.org/stable/modules/generated/sklearn.ensemble.RandomForestRegressor.htm
l#:~:text=A%20random%20forest%20regressor.,accuracy%20and%20control%20
over%2Dfitting.
• https://www.saedsayad.com/decision_tree_reg.htm#:~:text=Decision%20tree%20
builds%20regression%20or,decision%20nodes%20and%20leaf%20nodes.
• https://easychair.org/publications/preprint/htzQ
• https://medium.com/geekculture/flight-fare-prediction-93da3958eb95
• https://www.datascience2000.in/2021/12/flight-fare-prediction-using-
machine.html
• https://www.ijser.in/archives/v10i11/SE221105023044.pdf
• https://ieeexplore.ieee.org/document/9716563
• https://ijariie.com/AdminUploadPdf/Flight_price_prediction_using_ml_ijariie1941
1.pdf

49
International Journal of Research
Publication and Reviews
( Open Access, Peer Reviewed, International Journal)
(A+ Grade, Impact Factor5.536)
ISSN 2582-7421 Sr. No: IJRPR 55177

This certificate is awarded to Mrs. Uma Devi G, and certifies the acceptance
for publication of research paper entitled “Flight Fare Prediction System” in

50
“International Journal of Research Publication and Reviews”, Volume 4, Issue
5, 2023 .

Signed Date 21/05/2023


Editor-in-Chief
International Journal of Research Publication and Reviews
International Journal of Research
Publication and Reviews
( Open Access, Peer Reviewed, International Journal)
(A+ Grade, Impact Factor5.536)
ISSN 2582-7421 Sr. No: IJRPR 25525

This certificate is awarded to Mohammed Taha Meeran R, and certifies the


acceptance for publication of research paper entitled “Flight Fare Prediction

51
System” in “International Journal of Research Publication and Reviews”,
Volume 4, Issue 5, 2023.

Signed Date 21/05/2023


Editor-in-Chief
International Journal of Research Publication and Reviews
International Journal of Research
Publication and Reviews
( Open Access, Peer Reviewed, International Journal)
(A+ Grade, Impact Factor5.536)
ISSN 2582-7421 Sr. No: IJRPR 55176

This certificate is awarded to Jerome J, and certifies the acceptance for


publication of research paper entitled “Flight Fare Prediction System” in

52
“International Journal of Research Publication and Reviews”, Volume 4, Issue
5, 2023 .

Signed Date 21/05/2023


Editor-in-Chief
International Journal of Research Publication and Reviews
International Journal of Research
Publication and Reviews
( Open Access, Peer Reviewed, International Journal)
(A+ Grade, Impact Factor5.536)
ISSN 2582-7421 Sr. No: IJRPR 25524

This certificate is awarded to Deepak Ram R, and certifies the acceptance for
publication of research paper entitled “Flight Fare Prediction System” in

53
“International Journal of Research Publication and Reviews”, Volume 4, Issue
5, 2023.

Signed Date 21/05/2023


Editor-in-Chief
International Journal of Research Publication and Reviews
International Journal of Research Publication and Reviews, Vol 4, no 5, pp 4148-4151 May 2023

International Journal of Research Publication and Reviews


Journal homepage: www.ijrpr.com ISSN 2582-7421

Flight Fare Prediction System


Deepak Ram R1, Jerome J1, Mohammed Taha Meeran R1, Mrs. Uma Devi G2
*1
Computer Science and Engineering, Agni College of Technology
**2
Assistant Professor, Computer Science and Engineering Department, Agni College of Technology

ABSTRACT:

The Flight Fare Prediction System is a comprehensive solution aimed at accurately forecasting flight ticket prices, providing travelers with valuable insights for better
planning and decision-making. With the exponential growth of the airline industry and the increasing complexity of fare structures, predicting flight fares has become
a challenging task. This system leverages machine learning algorithms and historical flight data to generate accurate fare predictions. The system utilizes a vast dataset
comprising historical flight fares, including factors such as travel dates, destinations, airlines, departure times, and various other relevant variables. By analyzing this
data using advanced machine learning techniques, the system learns patterns and relationships, enabling it to make reliable predictions about future flight fares. The
Flight Fare Prediction System employs a combination of regression algorithms and ensemble methods to achieve high accuracy in its predictions. It considers various
factors that impact ticket prices, including seasonality, market demand, fuel costs, competition, and other dynamic variables. The integration of real-time data updates
ensures that the predictions remain up-to-date and reflect the latest market trends.

Key words: Prediction, Accuracy, and Regression algorithm.

I. INTRODUCTION
The Flight Fare Prediction System is a machine learning initiative that aims to estimate aircraft ticket costs using
relevant features and past data. This strategy is provided to travellers, travel firms, and airlines to anticipate trip
costs for planning, budgeting, and making sensible selections.
The purpose of this project is to create a dependable machine-learning model for predicting flight expenses by
considering numerous characteristics such as travel class, airline, departure and arrival destinations, travel dates,
and other pertinent information. To train the algorithm, a vast amount of historical flight data, such as ticket
pricing and other such attributes, will be employed. .
By Users of the Flight Fare Prediction System will have access to a user-friendly interface by entering their travel
information and receiving an estimated flight fare. The system will assess the input data and make precise
predictions using feature engineering, data preprocessing, and machine learning methods. Relevant evaluation
criteria will be utilised to ensure that the model is correct and reliable. and associated qualities. While the
accuracy of the predictions is heavily dependent on the quality of the data used for training and prediction, the
project will also prioritise data quality and integrity. Data preprocessing techniques like as data cleaning,
addressing missing values, and feature scaling will be utilised to ensure that the data used for training and
prediction is legitimate and trustworthy.
The Flight Fare Prediction System can help consumers plan their travel budgets, assist travel agencies in
delivering competitive pricing to their clients, and assist airlines with pricing strategies and revenue management.
The method has the potential to provide useful insights and benefits to the travel industry by applying machine
learning to precisely estimate airline fares and improve decision-making.
This project's goal is to create a dependable and accurate flight speed prediction system that can give users with
flight rates depending on important parameters. Forecast accuracy, model performance, and usability will be used
to evaluate systems. The project takes into account ethical aspects such as handling personal data and maintaining
fairness in assumptions.
Finally, the Flight Fare Prediction System is a machine learning project with the purpose of developing a system
that can accurately predict trip expenses based on prior data and relevant qualities. The technology has the
54
potential to improve decision-making in the travel industry and provide valuable data and benefits to travellers,
travel agencies, and airlines.

II. RELATED WORK


In this Section, we will look at a few studies that demonstrate how machine learning is implemented in flight fare
prediction systems.
A. "Airline Ticket Price Prediction: A Machine Learning Approach" by M. L. Ahirrao, et al. (2018): This

research paper proposes a flight fare prediction model using machine learning techniques such as regression
algorithms and time-series analysis. The study explores various factors influencing ticket prices and
compares the performance of different algorithms in predicting fare trends.

B. Flight Fare Prediction using Historical Data and Machine Learning Techniques" by A. Kumar, et al. (2019):
The paper presents a flight fare prediction system that combines historical flight data and machine learning
algorithms to forecast ticket prices. It analyzes factors such as departure time, travel duration, and airline
popularity to generate accurate fare predictions. The study compares the performance of different
algorithms and discusses the potential for improving prediction accuracy.

C. "Airline Fare Prediction Using Machine Learning" by A. L. Rodrigues, et al. (2020): This work focuses on
predicting airline fares using machine learning techniques. The study considers various parameters,
including airline popularity, route distance, and historical fare data, to train a predictive model. The authors
explore the performance of different algorithms and discuss the implications of their findings for fare
prediction accuracy.

D. "Predicting Airfare Using Machine Learning Techniques" by S. Aruna, et al. (2020): The paper presents a
comparative analysis of different machine learning algorithms for predicting airfare. The study considers
factors such as seasonality, time of booking, and flight class to develop a prediction model. The authors
evaluate the performance of regression algorithms, including linear regression, support vector regression,
and random forest regression.

E. "Flight Fare Prediction Using Ensemble Learning Techniques” by M.Sharma, et al. (2021): This research
focuses on the application of ensemble learning techniques for flight fare prediction. The study combines
multiple machine learning models, including decision trees, random forests, and gradient boosting, to
improve prediction accuracy. The authors compare the performance of individual models and ensemble
methods to identify the most effective approach.

F. “Flight Fare Prediction using Machine Learning Techniques” by K. Kumar and team (2017). This study
compares the performance of various machine learning techniques, including decision trees, support vector
machines, k-nearest neighbors, and random forests for flight fare prediction. This study also employs
features engineering techniques to extract relevant features from flight data and evaluates the models using
metrics such as mean squared error (MSE) and R-squared.

III. PROPOSED SYSTEM


The proposed system ensures that a user can use predict the fare of a flight based on the time and number of
stoppages without an actual internet connection with the help of existing data. This is achieved by training the
existing data with machine learning algorithms such as Linear Regression algorithm, Random Forest algorithm,
and Decision Tree Regressor algorithm.

55
Fig1: FLOW DIAGRAM OF THE PROPOSED

IV. MODULES
Modules include:
a. User Interface

b. Training Data

c. Obtaining Pickle File

d. Application Building

e. Output

a. USER INTERFACE MODULE


In this first user interface module, the user will be creating a perfect interactive webpage using HTML, CSS, and
JavaScript. HTML is used to simply create the webpage whereas CSS and JavaScript are used to give a fashioned
user interface and to give a seamless user interactive experience.
b. TRAINING DATA MODULE
This module is completely based on importing and training the existing data collected from the internet. The data
is trained using three machine learning algorithms for better accuracy such as Decision Tree Regression
algorithm, Linear Regression algorithm, and Random Forest algorithm.
c. OBTAINING PICKLE FILE MODULE
The trained data should be saved as a pickle file after training them with multiple machine learning algorithms.
Fig2: OBTAINING PICKLE FILE

d. APPLICATION BUILDING MODULE


As we have trained the data using several machine learning algorithms, now we should create the main
application. We have built the whole application using Python and we have imported the data set as a pickle file.
e. OUTPUT MODULE
Now that we have trained and built the application module as well as the user interface module, we have to
combine the whole code snippets into a perfect web application. Finally, we can now access it with our local
server as well as we can take it online at any time anywhere.

V. RESULT AND FUTURE WORKS


The accuracy and dependability of the fare forecasts are often taken into account while evaluating the outcomes
of the Flight Fare Prediction System. Metrics like mean absolute error (MAE), root mean square error (RMSE),
and percentage error can be used to assess the system's performance. The algorithms used, the quantity of the
dataset, and the accuracy and completeness of the historical flight data can all affect the outcomes. Low mistake
rates and fare estimates that closely match the real ticket pricing are the system's ultimate goals. Comparing
anticipated fares to actual fares for a set of test flights is one way to assess the system's performance, as is
examining the performance over a range of dates and routes. The outcomes should show how well the system
generates precise fares.
56
VI. REFERENCES

[1]. "Predicting Airline Ticket Prices Using Historical Data" Authors: R. B. Patterson and R. M. Patel
Published in: International Journal of Computer Applications, Vol. 52, No. 5, 2012.
[2]. Flight Fare Prediction using Historical Data and Machine Learning Techniques" Authors: A. Kumar, et
al. Published in: Proceedings of the 3rd International Conference on Computer, Communication, and
Signal Processing, 2019.
[3]. "Flight Fare Prediction Using Machine Learning Techniques" Authors: S. G. Sonawane and A. N.
Kadam Published in: International Journal of Advanced Research in Computer Science and Software
Engineering, Vol. 7, Issue 7, 2017.
[4]. "Airline Fare Prediction Using Machine Learning" Authors: A. L. Rodrigues, et al. Published in:
Proceedings of the International Conference on Data Engineering and Communication Technology,
2020.
[5]. "Flight Fare Prediction Using Machine Learning Techniques" Authors: R. N. Sahoo, B. Mishra, and S. P.
Dash Published in: Proceedings of the 3rd International Conference on Computational Intelligence in
Data Science (ICCIDS), 2019. DOI: 10.1109/ICCIDS.2019.9010314
[6]. "Predicting Airfare using Machine Learning Algorithms" Authors: K. Gupta and S. Agarwal Published
in: International Journal of Advanced Research in Computer Science and Software Engineering, Vol. 9,
Issue 3, 2019.
[7]. "Airfare Prediction with Deep Learning" Authors: A. Bansal, M. Shukla, S. Parthiban, and B. Sundarraj
Published in: 2020 International Conference on Electronics and Sustainable Communication Systems
(ICESC)
[8]. "Flight Price Prediction using Machine Learning Techniques" Authors: S. Chatterjee, A. Saini, and P.
Sharma Published in: International Journal of Computer Applications, Vol. 172, No. 8, 2017. DOI:
10.5120/ijca2017913795.
[9]. "Predicting Flight Prices using Machine Learning Algorithms" Authors: S. Verma and A. Gupta
Published in: International Journal of Computer Applications, Vol. 117, No. 15, 2015. DOI:
10.5120/ijca2015907272
[10]. "Airfare Prediction using Machine Learning Techniques" Authors: S. Kumar, V. Bajaj, and S. Joshi
Published in: International Journal of Computer Applications, Vol. 91, No. 8, 2014. DOI:
10.5120/16084-9437
[11]. "Airline Ticket Fare Prediction using Machine Learning Techniques" Authors: A. Sharma and S.
Verma Published in: 2020 11th International Conference on Computing, Communication and
Networking Technologies (ICCCNT) DOI: 10.1109/ICCCNT45670.2020.9226029
[12]. "Flight Fare Prediction using Machine Learning Techniques and Feature Selection" Authors: R. R.
Saravana Kumar, M. S. Siva, and S. P. Shantharajah Published in: 2020 International Conference on
Inventive Research in Computing Applications (ICIRCA) DOI:
10.1109/ICIRCA48642.2020.9169227
[13]. "Predicting Airfare using Machine Learning Algorithms" Authors: R. Varghese, S. Jacob, and S. J. Aby
Published in: 2019 International Conference on Communication and Signal Processing (ICCSP) DOI:
10.1109/ICCSP.2019.8698027
[14]. "Flight Fare Prediction using Machine Learning Algorithms" Authors: M. M. Aboul Hassan, A. M. El-
Sayed, and A. A. Fergany Published in: 2018 9th Cairo International Biomedical Engineering
Conference (CIBEC) DOI: 10.1109/CIBEC.2018.8743157
[15]. "Airfare Prediction: A Deep Learning Approach" Authors: H. Nguyen, A. Nguyen, and K. Nguyen
Published in: 2018 International Conference on Advanced Computing and Applications (ACOMP) DOI:
10.1109/ACOMP.2018.00008
[16]. "Airfare Prediction System using Machine Learning Techniques" Authors: N. Arifin, S. Hartono, and
N. P. D. Simamora Published in: 2017 2nd International Conferences on Information Technology,
Information Systems and Electrical Engineering (ICITISEE) DOI: 10.1109/ICITISEE.2017.8256920
[17]. "Predicting Flight Fares using Machine Learning Techniques" Authors: P. Kaushik and M. Kaur
Published in: 2016 International Conference on Computing, Communication and Automation (ICCCA)
DOI: 10.1109/CCAA.2016.7813906
[18]. "Machine Learning Approaches for Airfare Prediction" Authors: M. Gupta and A. Goyal Published in:
2015 International Conference on
Green Computing and Internet of Things (ICGCIoT) DOI: 10.1109/ICGCIoT.2015.7380513
57

You might also like