Git Product home page Git Product logo

decision-tree-flight-satisfaction-predictor's Introduction

Discription

Predict flight satisfaction using a decision tree algorithm. This repository includes code for training a decision tree model, evaluating its accuracy, and visualizing key insights such as information gain and correlation matrix.

Overview

This repository contains Python code for predicting flight satisfaction using a decision tree algorithm. The decision tree model is trained on a dataset containing information about various flight parameters and passenger satisfaction levels.

How to Use

  1. Clone the repository to your local machine.

  2. Install the required dependencies using pip install -r requirements.txt.

  3. Run the main.py script to execute the flight satisfaction prediction experiment.

    bashCopy code

    python main.py

    The experiment is run for two different subsets of data (2000 and 5000 rows) with random state 42.

Files and Directories

  • decision_tree.py: Contains the implementation of the DecisionTree class for building and using a decision tree model.
  • flight_satisfaction.csv: Dataset containing information about flight parameters and passenger satisfaction.
  • main.py: The main script to run the flight satisfaction prediction experiment.
  • results/: Directory to store experiment results, including correlation matrix heatmap, distribution plots, and information gain analysis.

Results

  • The accuracy of the decision tree model for different subsets of data is printed to the console.
  • Correlation matrix heatmap and distribution plots are saved in the results/ directory.
  • Information gain analysis results, including a plot, are saved in the results/rows_{number}/ directory.

Usage:

  1. Clone the repository:

    bashCopy code

    git clone https://github.com/your-username/Decision-Tree-Flight-Satisfaction-Predictor.git

  2. Navigate to the repository directory:

    bashCopy code

    cd Decision-Tree-Flight-Satisfaction-Predictor

  3. Install dependencies:

    bashCopy code

    pip install -r requirements.txt

  4. Run the experiment:

    bashCopy code

    python main.py

Requirements:

  • Python 3.x
  • pandas
  • numpy
  • scikit-learn
  • matplotlib
  • seaborn
  • tqdm

Feel free to modify the code and experiment with different parameters or datasets. Contributions are welcome!

License:

This project is licensed under the MIT License - see the LICENSE file for details.

decision-tree-flight-satisfaction-predictor's People

Contributors

arminrmt avatar

Watchers

 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.