Git Product home page Git Product logo

epl-prediction's Introduction

English Premier Leauge Prediction

The scope of this project is to predict the outcome of an English Premier Leauge match, based on historic data.

For more information about the data used, check notes.txt.

Installation

Requirements:

Create a virutal environment:

virtualenv .venv

Activate the environment:

source .venv/bin/activate

Install dependencies:

poetry install

Setup

Setup involves a 2 stage process.

  • Run the Flask app
  • Run training script and save the trained model.

Note: These steps are independent of each other as there is already a pre-trained model saved in AdaBoostClassifier.pkl

Run the Flask app

To run the application simply run the following command:

python __init__.py

The server should hopefully start running in http://127.0.0.1:5000

Home Page

Train the model

To train the model, simply run the following command:

python -m models.epl_engine

Change the default model

The default model used is AdaBoostClassifier, however you can change this to which ever sklearn model you desire by updating the main function in epl_engine.py

def main() -> None:
    # Change to the sklearn model you wish to use.
    from sklearn.ensemble import AdaBoostClassifier
    
    # ...code snippet

    # Update the following line accordingly to the imported model.
    clf = AdaBoostClassifier(n_estimators=500, learning_rate=1e-2)

Note: If you decide to change the model, be also sure to update the loaded classifier in the controller.py

# Change "AdaBoostClassifier.pkl" to whichever model you which to used
# saved in "models/trained/" folder.
CLF_PATH: str = os.path.join('models/trained/', 'AdaBoostClassifier.pkl')

Credits

Contribution

You are very welcome to modify and use them in your own projects.

Please keep a link to the original repository. If you have made a fork with substantial modifications that you feel may be useful, then please open a new issue on GitHub with a link and short description.

License (MIT)

This project is opened under the MIT which allows very broad use for both private and commercial purposes.

A few of the images used for demonstration purposes may be under copyright. These images are included under the "fair usage" laws.

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.