Skip to content

Latest commit

 

History

History
98 lines (64 loc) · 2.68 KB

README.md

File metadata and controls

98 lines (64 loc) · 2.68 KB

Shipping files

Flight Prediction Test on Airport Data from Tunesian Airline

Based on several machine learning classifier this project tries to predict delays of individual airplanes.

Data from here: https://zindi.africa/competitions/flight-delay-prediction-challenge (last access Aug 9th, 2024)

Set up the Presentation

  • Thre presentation can be started with streamlit. Make sure to have streamlit installed in your directory, as described in the requirements.

    streamlit run app.py

    After that a local host is started in your standard browser.

Set up your Environment

macOS type the following commands :

  • For installing the virtual environment you can either use the Makefile and run make setup or install it manually with the following commands:

    make setup

    After that active your environment by following commands:

    source .venv/bin/activate

Or ....

  • Install the virtual environment and the required packages by following commands:

    pyenv local 3.11.3
    python -m venv .venv
    source .venv/bin/activate
    pip install --upgrade pip
    pip install -r requirements.txt

WindowsOS type the following commands :

  • Install the virtual environment and the required packages by following commands.

    For PowerShell CLI :

    pyenv local 3.11.3
    python -m venv .venv
    .venv\Scripts\Activate.ps1
    pip install --upgrade pip
    pip install -r requirements.txt

    For Git-bash CLI :

    pyenv local 3.11.3
    python -m venv .venv
    source .venv/Scripts/activate
    pip install --upgrade pip
    pip install -r requirements.txt

    Note: If you encounter an error when trying to run pip install --upgrade pip, try using the following command:

    python.exe -m pip install --upgrade pip

Usage

In order to train the model and store test data in the data folder and the model in models run:

Note: Make sure your environment is activated.

python example_files/train.py  

In order to test that predict works on a test set you created run:

python example_files/predict.py models/linear_regression_model.sav data/X_test.csv data/y_test.csv

Limitations

Development libraries are part of the production environment, normally these would be separate as the production code should be as slim as possible.