Code Monkey home page Code Monkey logo

fiza-102 / airline-flight-fare-prediction Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 152 KB

This model predicts the fare of flight on the basis of old records . In the process of completing this project - data cleaning, data processing , balancing the data and converting the categorical data into numerical data.

Jupyter Notebook 100.00%
categorical-data exploratory-data-analysis feature-engineering labelencoder machine-learning one-hot-encoding visualization

airline-flight-fare-prediction's Introduction

AIRLINE-FLIGHT-FARE-PREDICTION

This model predicts the fare of flight on the basis of old records . In the process of completing this project - data cleaning, data processing , balancing the data and converting the categorical data into numerical data.

Table of Contents

Overview

In this case, I will be analyzing the flight fare prediction using Machine Learning dataset using essential exploratory data analysis techniques then will draw some predictions about the price of the flight based on some features such as what type of airline it is, what is the arrival time, what is the departure time, what is the duration of the flight, source, destination and more.

Dataset

  • Airline : So this column will have all the types of airlines like Indigo, Jet Airways, Air India, and many more.
  • Date_of_Journey: This column will let us know about the date on which the passenger’s journey will start.
  • Source: This column holds the name of the place from where the passenger’s journey will start.
  • Destination: This column holds the name of the place to where passengers wanted to travel.
  • Route: Here we can know about that what is the route through which passengers have opted to travel from his/her source to their destination.
  • Arrival_Time: Arrival time is when the passenger will reach his/her destination.
  • Duration: Duration is the whole period that a flight will take to complete its journey from source to destination.
  • Total_Stops: This will let us know in how many places flights will stop there for the flight in the whole journey.
  • Additional_Info: In this column, we will get information about food, kind of food, and other amenities.
  • Price: Price of the flight for a complete journey including all the expenses before onboarding.

Prerequisites

jupyter notebook, python libraries: Numpy, Pandas, onehot encoding. label encoder , Matplotlib, NLP,machine learning.

Procedure

  • EDA: Learn the complete process of EDA
  • Data analysis: Learn to withdraw some insights from the dataset both mathematically and visualize it.
  • Data visualization: Visualising the data to get better insight from it.
  • Feature engineering: We will also see what kind of stuff we can do in the feature engineering part.

Installations

import numpy as np
import pandas as pd

import matplotlib.pyplot as plt
import seaborn as sns

from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error as mse
from sklearn.metrics import r2_score
from math import sqrt
from sklearn.linear_model import Ridge
from sklearn.linear_model import Lasso
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import RandomForestRegressor
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import KFold
from sklearn.model_selection import train_test_split
from sklearn.model_selection import GridSearchCV
from sklearn.model_selection import RandomizedSearchCV

Results

I have done a complete EDA process, getting data insights, feature engineering, and data visualization as well so after all these steps I can go for the prediction using machine learning model-making steps, here I have used RandomizedSearchCV for prediction.

airline-flight-fare-prediction's People

Contributors

fiza-102 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.